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

Unexpected token 'export' #117

Open
PlainBane opened this issue Apr 18, 2023 · 0 comments
Open

Unexpected token 'export' #117

PlainBane opened this issue Apr 18, 2023 · 0 comments

Comments

@PlainBane
Copy link

Describe the bug
Hi. I'm getting this error on npm dev. The fix is to add "type": "module" to package.json. I'm using import, so node expects esm module.
I'm just reporting. Can live with it.

Internal server error: Unexpected token 'export'
      at internalCompileFunction (node:internal/vm:73:18)
      at wrapSafe (node:internal/modules/cjs/loader:1195:20)
      at Module._compile (node:internal/modules/cjs/loader:1239:27)
      at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
      at Module.load (node:internal/modules/cjs/loader:1133:32)
      at Module._load (node:internal/modules/cjs/loader:972:12)
      at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:165:29)
      at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
/home/user/_Dev/Web/Sveltekit/account/node_modules/.pnpm/[email protected]/node_modules/just-validate/dist/just-validate.es.js:1577
export {
^^^^^^

SyntaxError: Unexpected token 'export'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1195:20)
    at Module._compile (node:internal/modules/cjs/loader:1239:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
    at Module._load (node:internal/modules/cjs/loader:972:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:165:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)

To Reproduce
Steps to reproduce the behavior:

  1. Install Just-validate
  2. Run npm dev (Vite dev)
  3. See error
zs-ko added a commit to zerosubnet/Just-validate that referenced this issue Aug 23, 2023
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

1 participant