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

sveltekit vite plugin is crashing vite-node #6536

Closed
acarl005 opened this issue Sep 2, 2022 · 2 comments
Closed

sveltekit vite plugin is crashing vite-node #6536

acarl005 opened this issue Sep 2, 2022 · 2 comments

Comments

@acarl005
Copy link

acarl005 commented Sep 2, 2022

Describe the bug

This error gets thrown at the end of my script when i run vite-node from the command line.

TypeError: p.closeBundle.call is not a function
    at eval (file:///home/projects/sveltejs-kit-template-default-t83pry/node_modules/vite-node/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:35663:81)
    at Array.map (<anonymous>)
    at Object.close (file:///home/projects/sveltejs-kit-template-default-t83pry/node_modules/vite-node/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:35663:39)
    at async Promise.all (index 2)
    at async Object.close (file:///home/projects/sveltejs-kit-template-default-t83pry/node_modules/vite-node/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:59298:13)
    at async CAC.run (file:///home/projects/sveltejs-kit-template-default-t83pry/node_modules/vite-node/dist/cli.mjs:684:5)

See my repro and run chmod +x ./scripts/run.sh && npm run foo.

Reproduction

See my repro and run chmod +x ./scripts/run.sh && npm run foo.

I added a console.log(p.closeBundle) to see why call isn't a function, and this is what is printed:

{ sequential: true, handler: [AsyncFunction: handler] }

Logs

No response

System Info

  System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.17.0 - /usr/local/bin/npm
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.71 
    @sveltejs/kit: next => 1.0.0-next.463 
    svelte: ^3.46.0 => 3.50.0 
    vite: ^3.1.0-beta.1 => 3.1.0-beta.2 

Severity

serious, but I can work around it

Additional Information

Removing the @sveltejs/kit/vite/sveltekit plugin fixes the issue.

@dominikg
Copy link
Member

dominikg commented Sep 2, 2022

Please don't cross-post issues without mentioning

This looks like vite-node not supporting the new object-style hook syntax so i'm closing this one here in favor of vitest-dev/vitest#1960

@acarl005
Copy link
Author

acarl005 commented Sep 2, 2022

@dominikg Sorry about that! I'll be sure to mention the other post next time.

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

3 participants