Report this

What is the reason for this report?

NPM Error All of a sudden

Posted on July 18, 2024

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
0

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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.