Import error with Nuxt
zguig52 opened this issue · 3 comments
zguig52 commented
Hello,
Trying to use VentoJS, but I cannot find a way to use it inside a Nuxt project.
There are issues with import statement. I have tried to transpile it but nothing works.
Using latest: "ventojs": "^0.12.2"
The error message is following:
✘ [ERROR] Could not resolve "./src/environment.js"
node_modules/ventojs/esm/mod.js:2:28:
2 │ import { Environment } from "./src/environment.js";
╵ ~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "./src/loader.js"
node_modules/ventojs/esm/mod.js:3:27:
3 │ import { FileLoader } from "./src/loader.js";
╵ ~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "./deps/deno.land/x/astring@v1.8.6/src/astring.js"
node_modules/ventojs/esm/deps.js:3:25:
3 │ ...as astring from "./deps/deno.land/x/astring@v1.8.6/src/astring.js";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here you can find a running environment to reproduce it quickly.
https://stackblitz.com/edit/github-qytiun-equv3u?file=package.json,app.vue
oscarotero commented
Looks like the NPM build is adding the src
folder to the npmignore, so it's not included in the package.
I'm fixing it.
oscarotero commented
Can you try now? I just published 0.12.3
zguig52 commented
It works fine now. Thanks a lot for the quick fix! Let's try vento templating language now :)