Hi,
I'm trying to import BryntumCalendar on my app.
My app is a create-react-app with react 16.3.1 (same version of the example).
The exemple work find but when I try to import it to my app I have this error :
My import steps :
Install and build the example react calendar
Copy/Paste @bryntum/calendar-react, @bryntum/demo-resources, bryntum-calendar from node-module (in the example project) to my code source
We could not reproduce this issue. To assist you with your question, please provide more details including a runnable test case (as described in our support guidelines).
To get the fastest possible support, provide a simple test case based on our standard examples.
There is an issue in react 17. It cannot compile scss styles outside the src folder. You might have seen this error or similar:
Failed to compile.
./src/App.scss (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-6-3!./node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-6-4!./src/App.scss)
Module not found: You attempted to import ../../../../../../build/calendar.material.css which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
But the thing is that the library should not be under src. Instead you need to go to the calendar/build folder and run "npm pack .". This command will create a tgz file, for example bryntum-calendar-4.0.3.tgz. So in the package.json file just need to use it as a target path. For example:
The error you see is due to the missing theme. If you get the filtering demo (Calendar/examples/frameworks/react/javascript/filtering) up and running and comment out the theme (calendar.material.css) you'll get exactly the same error you described in the first post. If you think that this is not the case, please apply minimal changes to our demo, then zip it up and attach here (excluding libs and node modules). We will investigate. Thanks!