search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Uncaught ReferenceError: module is not defined

Asked by Vahid
2 years ago.

Hi everyone,

I installed the Daypilot with npm here is my index.html
<script src="daypilot-javascript.min.js"></script>

<div id="dp"></div>

<script>
const dp = new DayPilot.Calendar("dp", {
viewType: "Resources",
columns: [
{id: 1, name: "Person 1"},
{id: 2, name: "Person 2"},
{id: 3, name: "Person 3"}
]
});
dp.init();
</script>

everthing works fine but in console is shown this error :

Uncaught ReferenceError: module is not defined

Answer posted by Dan Letecky [DayPilot]
2 years ago.

If you want to include the library directly using <script> element you need to download the zip package and include daypilot-all.min.js file instead of using NPM:

Pro version:
https://javascript.daypilot.org/try/

Open-source version:
https://javascript.daypilot.org/download/

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.