Show cool things you have done with our products


Post by hetal »

followed steps from- https://www.bryntum.com/docs/scheduler/#guides/integration/react.md
i am not getting error - Module not found: Can't resolve 'bryntum-scheduler'

Post by mats »

Please provide information about your OS and give us a full log of your console.

Post by pmiklashevich »

Please also mention what demo you've tried to get running.

Pavlo Miklashevych
Sr. Frontend Developer


Post by hetal »

  • node version - 10.15.3
    npm version - 6.4.1
    os - Linux 64-bit
    demo downloaded -bryntum-scheduler-trial
    I extracted trial demo.
    Copied BryntumScheduler.js file from mentioned path (Using the BryntumScheduler wrapper- https://www.bryntum.com/docs/scheduler/#guides/integration/react.md)
    pasted the file in my project's component folder
    imported BryntumScheduler fiel and used that component in one of my project component
    compile failed getting error -
    Module not found: Can't resolve 'bryntum-scheduler' in component file name
seems bryntum-scheduler is not downloaded while npm install. because .
package.json 
does not contain bryntum-scheduler package

Post by pmiklashevich »

Hello,
demo downloaded -bryntum-scheduler-trial
It's not a demo, it is a product. Let's do it this way. I'm going to get Advanced react demo and Simple react demo running and provide here detailed steps. Please follow the steps:

1. Go to bryntum.com and download Bryntum Scheduler trial
2. Unzip bryntum-scheduler-trial.zip
3. Go to scheduler-2.2.0-trial/examples/react/_shared
4. Run `npm install` and then `npm run build`
5. Go to scheduler-2.2.0-trial/examples/react/javascript/advanced
6. Run `npm install` and then `npm run start`
7. Advanced demo is running. Go to https://localhost:3000/ and make sure scheduler is visible and there is no errors in console
8. Go to scheduler-2.2.0-trial/examples/react/javascript/simple
9. Run `npm install` and then `npm run start`
7. Simple demo is running. Go to https://localhost:3001/ and make sure scheduler is visible and there is no errors in console

Let me know please if these steps work for you.

Best,
Pavel

P.S. These steps are in examples/react/javascript/advanced/README.md and examples/react/javascript/simple/README.md files.

Pavlo Miklashevych
Sr. Frontend Developer


Post by hetal »

Yes. I can see scheduler, but after adding new event and clicking on it i am getting -
TypeError: Cannot read property 'isMilestone' of null

Post by pmiklashevich »

seems `bryntum-scheduler` is not downloaded while `npm install`. because `package.json` does not contain `bryntum-scheduler` package.
That's true. If you look at examples/react/_shared/src/lib/BryntumScheduler.js, you'll see that wrapper imports scheduler from 'bryntum-scheduler/scheduler.umd'. All the prebuilt sources are placed in scheduler-2.2.0-trial/build. Please update your `package.json` file and add `bryntum-scheduler` to dependency as a local npm package:
"bryntum-scheduler": "file:../../../../build",
If you need, you can copy `build` folder somewhere to your project.

I'll update the guide accordingly.

Please try this out and let me know if it works for you now.

Cheers!

Pavlo Miklashevych
Sr. Frontend Developer


Post by hetal »

i successfully access the scheduler now.
ƒ BryntumScheduler() {
        var _ref;

        var _temp, _this, _ret;

        _classCallCheck(this, BryntumScheduler);

        for (var _len = arguments.length, args = Array(_len), _key = 0; _key…


But while appending it to DOM I'm getting

scheduler.umd.js:48 Uncaught TypeError: Cannot read property 'name' of null

Post by pmiklashevich »

Could you please upload a small runnable testcase that shows the issue? We need a context to look at.

Pavlo Miklashevych
Sr. Frontend Developer


Post by hetal »

i have sent a mail with attached screenshot. Please find it.

Post Reply