- 
                Notifications
    
You must be signed in to change notification settings  - Fork 67
 
Open
Description
Bug Report
Current Behavior
When a sveltekit project is using quirrel and luxon, in module mode type: "module" then there is an error when using the built deliverable with:
node buildWhen we try to use quirrel there is the following exception:
Listening on 0.0.0.0:3000
file:///home/dev/src/sveltekit-quirrel-esm/build/server/chunks/_server.ts-f169324c.js:11
import require$$0$4 from 'luxon';
       ^^^^^^^^^^^^
SyntaxError: The requested module 'luxon' does not provide an export named 'default'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:131:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:213:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
    at async Promise.all (index 1)
    at async render_page (file:///home/dev/src/sveltekit-quirrel-esm/build/server/index.js:3161:19)
    at async resolve (file:///home/dev/src/sveltekit-quirrel-esm/build/server/index.js:3886:24)
    at async respond (file:///home/dev/src/sveltekit-quirrel-esm/build/server/index.js:3772:22)
    at async Array.ssr (file:///home/dev/src/sveltekit-quirrel-esm/build/handler.js:1221:3)- Repo link if applicable:
 
See for example https://github.com/iroco-co/sveltekit-quirrel-esm
Everything was OK until I added luxon to the project.
Expected behavior/code
That there is no errors running quirrel.
Note that there is maybe a typescript/es configuration to make the app working.
Environment
- Quirrel version: 1.14.1
 - Node/npm version: Node 20/npm 10
 
Possible Solution
It seems that the import from cron-parser :
var luxon = require('luxon');
is not compatible with ES6.
I began to try with another lib but there is probably a simpler configuration tweak.
Thank you for your comments or advice.
Metadata
Metadata
Assignees
Labels
No labels