-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cannot run npm ci --prod
with adapter-node
#4585
Comments
I think making the |
Since we're mostly interested in the install behavior (since ps. powershell's |
I tried this from powershell and the script was still run with cmd.exe. I don't know whether there's some configuration that would have made that work differently. Having it be in Kit's postinstall would be another option, and that would have been my fallback solution if I couldn't find a cross-platform thing to do in the prepare script, but I imagine it would be more moving pieces. |
When exactly should sync run. Using the prepare lifecycle seems inappropriate for it given it is called during multiple different phases and run in the background since npm@7 . There may be differences in behavior between package managers too, https://docs.npmjs.com/cli/v8/using-npm/scripts#life-cycle-scripts Using postinstall is less invasive than prepare, but is relying on pre/post hooks, which may not be executed. ( due to --ignore-scripts cli flag, pnpm onlyBuiltDependencies option etc). So if something relies on sync being run before it needs to check that (validate expected files to exist / hash matching) anyways. |
@Conduitry I don't know what's the configuration or combination of shell and package manager required to trigger it, but this is what I get on
@dominikg |
I agree that erring on the side of not running Having a We would potentially need to worry about making |
In theory We do have access to |
This comment was marked as off-topic.
This comment was marked as off-topic.
As a workaround, remove the It is automatically called by |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Vite tries to read the I was going to say I'm not sure how |
The latest version of @sveltejs/kit now uses a postinstall hook to run sync instead of prepare and Please check it out and confirm that it fixes this issue you had |
I'm going to go ahead and close this, because it looks good to me now. On a fresh template, |
Describe the bug
adapter-node says that
npm ci --prod
should be used to run the build.However, this command fails
Reproduction
npm ci --prod
Logs
System Info
Severity
serious, but I can work around it
Additional Information
Workaround:
sed -i '/prepare/d' package.json && npm ci --prod
The text was updated successfully, but these errors were encountered: