Our pure JavaScript Scheduler component


Post by PinHsuehLi »

The error message occurs in the "scheduler.module.js:147 "

html:
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"> 
    
    <script src="./scheduler-1.1.2-trial/build/scheduler.module.js"></script>
    <link id="bryntum-theme" rel="stylesheet" type="text/css" href="./scheduler-1.1.2-trial/build/scheduler.dark.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    
</head>
<body>
    <div id="app"></div>
    <script type="module" src="./javascripts/main.js"></script>
</body>
</html>
main.js:
import {Scheduler} from '../scheduler-1.1.2-trial/build/scheduler.module.js';
My browser is Chrome 71.0
And I run my HTML on the ExpressJS server.
Attachments
getEvent.PNG
getEvent.PNG (28.25 KiB) Viewed 3888 times
files.PNG
files.PNG (9.41 KiB) Viewed 3891 times

Post by johan.isaksson »

Hi,

Try removing the script tag for the scheduler.module.js bundle. ES modules cannot be imported like that, the import statement you have in main.js should suffice.
Best regards,
Johan Isaksson

Post by PinHsuehLi »

It works, thank you.

Post Reply