neuronetio / gantt-schedule-timeline-calendar

Gantt Gantt Gantt Timeline Schedule Calendar [ javascript gantt, js gantt, projects gantt, timeline, scheduler, gantt timeline, reservation timeline, react gantt, angular gantt, vue gantt, svelte gantt, booking manager ]
https://gantt-schedule-timeline-calendar.neuronet.io
Other
3.11k stars 361 forks source link

gantt-schedule-timeline-calendar used in my svelte project go wrong #326

Closed shb-mooncake closed 2 years ago

shb-mooncake commented 2 years ago

`PS C:\workplace-ty-tygit\pmap-pc> npm run dev

pmap-pc-v2@0.0.1 dev svelte-kit dev

nodemodules/gantt-schedule-timeline-calendar/dist/vendor.esm.min.js:31:266: error: Transforming for-await loops to the configured target environment ("es2015") is not supported yet 31 │ ...J)return;this.$CJ=e;let n=0;const{$CG:s,$CK:a}=this;return(async(t,e)=>{for await(const i of t)if(!1===await e(i))return})(e,(async t=>{for(;a.get();)await a.g... ╵ ~

Build failed with 1 error: node_modules/gantt-schedule-timeline-calendar/dist/vendor.esm.min.js:31:266: error: Transforming for-await loops to the configured target environment ("es2015") is not supported yet Error: Build failed with 1 error: node_modules/gantt-schedule-timeline-calendar/dist/vendor.esm.min.js:31:266: error: Transforming for-await loops to the configured target environment ("es2015") is not supported yet at failureErrorWithLog (C:\workplace-ty-tygit\pmap-pc\node_modules\esbuild\lib\main.js:1493:15) at C:\workplace-ty-tygit\pmap-pc\node_modules\esbuild\lib\main.js:1151:28 at runOnEndCallbacks (C:\workplace-ty-tygit\pmap-pc\node_modules\esbuild\lib\main.js:941:63) at buildResponseToResult (C:\workplace-ty-tygit\pmap-pc\node_modules\esbuild\lib\main.js:1149:7) at C:\workplace-ty-tygit\pmap-pc\node_modules\esbuild\lib\main.js:1258:14 at C:\workplace-ty-tygit\pmap-pc\node_modules\esbuild\lib\main.js:629:9 at handleIncomingPacket (C:\workplace-ty-tygit\pmap-pc\node_modules\esbuild\lib\main.js:726:9) at Socket.readFromStdout (C:\workplace-ty-tygit\pmap-pc\node_modules\esbuild\lib\main.js:596:7) at Socket.emit (events.js:315:20) at Socket.EventEmitter.emit (domain.js:467:12)`

`$ nvm list

17.3.0
neuronetio commented 2 years ago

It's because of some transpiler - something from an esbuild, I guess Maybe try to change your target from es2015 to something higher (I don't know where you have this kind of configuration in your project).

I've created an example how to use gantt-schedule-timeline-calendar in svelte here:

https://github.com/neuronetio/svelte-gantt-schedule-timeline-calendar-example

The problem is not related directly to gantt-schedule-timeline-calendar but to your specific edge case and your project environment.