Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to load finweck-tree.js in Nuxt 3 #187

Open
superstoffer opened this issue Jun 16, 2022 · 2 comments
Open

Error when trying to load finweck-tree.js in Nuxt 3 #187

superstoffer opened this issue Jun 16, 2022 · 2 comments

Comments

@superstoffer
Copy link

Error when trying to load finweck-tree.js in Nuxt 3

/Users/christoffer/coding/nuxt3-app/node_modules/vueuc/es/shared/finweck-tree.js:4
export class FinweckTree {
^^^^^^

SyntaxError: Unexpected token 'export'
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1027:15)
    at Module._compile (node:internal/modules/cjs/loader:1063:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:170:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:409:24)
[nitro] [request error] [vite dev] Error loading external "/Users/christoffer/coding/nuxt3-app/node_modules/vueuc/es/shared/finweck-tree.js".
  at ./.nuxt/dist/server/server.mjs:10131:293
  at async __instantiateModule__ (./.nuxt/dist/server/server.mjs:121698:3)
[nitro] [request error] [vite dev] Error loading external "/Users/christoffer/coding/nuxt3-app/node_modules/vueuc/es/shared/finweck-tree.js".
  at ./.nuxt/dist/server/server.mjs:10131:293
  at async __instantiateModule__ (./.nuxt/dist/server/server.mjs:121698:3)

@07akioni
Copy link
Owner

Maybe you should add it to transform.

@07akioni
Copy link
Owner

The package is not now a pure esm module. So nuxt won't work with it by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants