Question

App Platform Deployment Failing Due To npm Error. Not Sure How To Solve

Recently, my deployments to my node app started to fail. They were successful, then all of a sudden they all started to fail with the same error message found below. I have not changed anything in my app/source code. What could be the problem?

[2022-04-21 05:30:19] => Initializing build [2022-04-21 05:30:19] => Retrieving source code to /workspace [2022-04-21 05:30:19] => Selecting branch “master” [2022-04-21 05:30:20] => Checking out commit “commit” [2022-04-21 05:30:21] => Got source_dir: / [2022-04-21 05:30:21] => Using workspace root /workspace [2022-04-21 05:30:21] [2022-04-21 05:30:21] => Building app using buildpacks [2022-04-21 05:30:21] => Injecting app environment variables: [2022-04-21 05:30:21] ENV [2022-04-21 05:30:21] => Running buildpack detection [2022-04-21 05:30:21] [2022-04-21 05:30:21] 3 of 4 buildpacks participating [2022-04-21 05:30:21] heroku/nodejs-engine 0.5.0 [2022-04-21 05:30:21] digitalocean/node 0.3.4 [2022-04-21 05:30:21] digitalocean/procfile 0.0.3 [2022-04-21 05:30:21] [2022-04-21 05:30:21] For documentation on the buildpacks used to build your app, please see: [2022-04-21 05:30:21] Node.js: https://do.co/apps-buildpack-node [2022-04-21 05:30:22] [2022-04-21 05:30:22] => Checking for cache from a previous build [2022-04-21 05:30:29] Layer cache not found [2022-04-21 05:30:29] Restoring metadata for “heroku/nodejs-engine:nodejs” from app image [2022-04-21 05:30:32] Layer cache not found [2022-04-21 05:30:33] Removing “heroku/nodejs-engine:nodejs”, not in cache [2022-04-21 05:30:33] [2022-04-21 05:30:33] => Building app [2022-04-21 05:30:33] [2022-04-21 05:30:33] —> Node.js Buildpack [2022-04-21 05:30:33] —> Installing toolbox [2022-04-21 05:30:33] —> - jq [2022-04-21 05:30:33] —> - yj [2022-04-21 05:30:34] —> Getting Node version [2022-04-21 05:30:34] —> Resolving Node version [2022-04-21 05:30:36] —> Downloading and extracting Node v18.0.0 [2022-04-21 05:30:52] —> Parsing package.json [2022-04-21 05:30:52] —> No file to start server [2022-04-21 05:30:52] —> either use ‘docker run’ to start container or add index.js or server.js [2022-04-21 05:30:52] Project contains package-lock.json, using npm [2022-04-21 05:30:52] unable to invoke layer creator [2022-04-21 05:30:52] checking installed npm version: checking npm version: exit status 1 [2022-04-21 05:30:52] ERROR: failed to build: exit status 1 [2022-04-21 05:30:54] [2022-04-21 05:30:54] For documentation on the buildpacks used to build your app, please see: [2022-04-21 05:30:54] Node.js: https://do.co/apps-buildpack-node [2022-04-21 05:30:54] [2022-04-21 05:30:54] ! Build failed (145)


Submit an answer

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!

Sign In or Sign Up to Answer