scheduler trial version : Can't resolve 'bryntum-scheduler'

Show cool things you have done with our products
User avatar
hetal
Posts: 6
Joined: Mon Jul 22, 2019 3:43 pm

scheduler trial version : Can't resolve 'bryntum-scheduler'

Post by hetal » Mon Jul 22, 2019 3:52 pm

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'

User avatar
mats
Core Developer
Core Developer
Posts: 14593
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: scheduler trial version : Can't resolve 'bryntum-scheduler'

Post by mats » Mon Jul 22, 2019 3:59 pm

Please provide information about your OS and give us a full log of your console.
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 2254
Joined: Fri Apr 01, 2016 11:08 am

Re: scheduler trial version : Can't resolve 'bryntum-scheduler'

Post by pmiklashevich » Mon Jul 22, 2019 4:01 pm

Please also mention what demo you've tried to get running.
Pavel Miklashevich - Core Developer

User avatar
hetal
Posts: 6
Joined: Mon Jul 22, 2019 3:43 pm

Re: scheduler trial version : Can't resolve 'bryntum-scheduler'

Post by hetal » Tue Jul 23, 2019 7:47 am

  • 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 -

    Code: Select all

    Module not found: Can't resolve 'bryntum-scheduler' in component file name
seems bryntum-scheduler is not downloaded while npm install. because .

Code: Select all

package.json 
does not contain bryntum-scheduler package

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 2254
Joined: Fri Apr 01, 2016 11:08 am

Re: scheduler trial version : Can't resolve 'bryntum-scheduler'

Post by pmiklashevich » Tue Jul 23, 2019 10:24 am

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 http://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 http://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.
Pavel Miklashevich - Core Developer

User avatar
hetal
Posts: 6
Joined: Mon Jul 22, 2019 3:43 pm

Re: scheduler trial version : Can't resolve 'bryntum-scheduler'

Post by hetal » Tue Jul 23, 2019 10:31 am

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

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 2254
Joined: Fri Apr 01, 2016 11:08 am

Re: scheduler trial version : Can't resolve 'bryntum-scheduler'

Post by pmiklashevich » Tue Jul 23, 2019 10:49 am

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:

Code: Select all

"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!
Pavel Miklashevich - Core Developer

User avatar
hetal
Posts: 6
Joined: Mon Jul 22, 2019 3:43 pm

Re: scheduler trial version : Can't resolve 'bryntum-scheduler'

Post by hetal » Tue Jul 23, 2019 12:40 pm

i successfully access the scheduler now.

Code: Select all

ƒ 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

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 2254
Joined: Fri Apr 01, 2016 11:08 am

Re: scheduler trial version : Can't resolve 'bryntum-scheduler'

Post by pmiklashevich » Tue Jul 23, 2019 12:46 pm

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

User avatar
hetal
Posts: 6
Joined: Mon Jul 22, 2019 3:43 pm

Re: scheduler trial version : Can't resolve 'bryntum-scheduler'

Post by hetal » Tue Jul 23, 2019 12:56 pm

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

Post Reply