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
vite-node — TypeError: p.closeBundle.call is not a function #1960
Comments
vite-node defines its Vite version as |
latest version of SvelteKit is already using vite 3.1.0-beta and the new object-style hook syntax from rollup 2.78.0. I guess vite-node needs to support it by checking for |
Vite-node doesn't call this code. You can see in the stack trace that it just runs Vite. @acarl005 has several Vite versions installed, and vite-node uses its local Vite version, which I assume is lower than 3.1.0 |
Ah yes that's correct. According to the
I see that the version spec for |
Do you have any source on that? According to the link I mentioned, it satisfies semver. |
@sheremet-va It seems the official semantic versioner output is different. Check out this code snippet. const semver = require('semver')
semver.satisfies("3.1.0-beta.2", "^3.0.0-0") // false
semver.satisfies("3.0.0-beta.2", "^3.0.0-0") // true According to the NPM docs, that is the official package used to determine semver compatibility. I found an explanation of this behavior in the source code, and in the docs. Basically, it looks like it is impossible to opt-in to all prerelease versions within a range, even if your range is |
I guess the only way to test
I don't think we can put every beta version 😄 If this satisfies you, we can close the issue. |
Yep that works! Thanks for your help! |
Describe the bug
This error gets thrown at the end of my script when i run
vite-node
from the command line.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 whycall
isn't a function, and this is what is printed:System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: