I’m getting a weird npm error all of a sudden and now my APP won’t build. I’ve tried updating my npm version and node version, I’ve tried deleting npm cache. I’ve tried everything I can think of. This doesn’t happen on my local machine only on digital ocean:
Running npm ci
[2024-07-18 22:48:38] │
[2024-07-18 22:48:46] │ npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
[2024-07-18 22:48:46] │ npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
[2024-07-18 22:48:56] │ npm ERR! Exit handler never called!
[2024-07-18 22:48:56] │
[2024-07-18 22:48:56] │ npm ERR! This is an error with npm itself. Please report this error at:
[2024-07-18 22:48:56] │ npm ERR! <https://github.com/npm/cli/issues>
[2024-07-18 22:48:56] │
[2024-07-18 22:48:56] │ npm ERR! A complete log of this run can be found in: /home/apps/.npm/_logs/2024-07-18T22_48_38_703Z-debug-0.log
[2024-07-18 22:48:56] │
[2024-07-18 22:48:56] │ unable to invoke layer creator
[2024-07-18 22:48:56] │ installing node_modules: exit status 1
[2024-07-18 22:48:56] │ ERROR: failed to build: exit status 1
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hi @happygrayangler,
It looks like this is a bug in NPM/Node.js: https://github.com/npm/cli/issues/7657
As a workaround to this, I imagine you can set your Node.js version in your package.json engines stanza to be a version of Node.js prior to 22.5.0: https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/#specifying-versions
Cheers.
- Matt.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.