-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Description
I am attempting to do a heroku deploy for a node.js app and whenever it runs npm i, it runs into the below error:
Installing dependencies
remote: Installing node modules (package.json + package-lock)
remote: npm error Exit handler never called!
remote: npm error This is an error with npm itself. Please report this error at:
remote: npm error <https://github.com/npm/cli/issues>
remote: npm error A complete log of this run can be found in: /tmp/npmcache.IjQGE/_logs/2025-07-28T18_58_44_986Z-debug-0.log
Here is the full error
Enumerating objects: 281, done.
Counting objects: 100% (281/281), done.
Delta compression using up to 10 threads
Compressing objects: 100% (242/242), done.
Writing objects: 100% (281/281), 224.12 KiB | 6.40 MiB/s, done.
Total 281 (delta 161), reused 82 (delta 27), pack-reused 0
remote: Resolving deltas: 100% (161/161), done.
remote: Updated 63 paths from 6ccd317
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-22 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: USE_NPM_INSTALL=true
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 20.18.1
remote: engines.npm (package.json): 10.8.2
remote:
remote: Resolving node version 20.18.1...
remote: Downloading and installing node 20.18.1...
remote: npm 10.8.2 already installed with node
remote:
remote: -----> Installing dependencies
remote: Installing node modules (package.json + package-lock)
remote: npm error Exit handler never called!
remote: npm error This is an error with npm itself. Please report this error at:
remote: npm error <https://github.com/npm/cli/issues>
remote: npm error A complete log of this run can be found in: /tmp/npmcache.IjQGE/_logs/2025-07-28T18_58_44_986Z-debug-0.log
remote:
remote: -----> Build
remote: Running build
remote:
remote: > [email protected] build
remote: > NEXT_PUBLIC_PAYPAL_ENV=production NODE_OPTIONS=--openssl-legacy-provider next build
remote:
remote: sh: 1: next: not found
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to v2-lighthouse-ecommerce.
remote:
To https://git.heroku.com/v2-lighthouse-ecommerce.git
! [remote rejected] main -> main (pre-receive hook declined)
I am able to npm install locally on my machine and it runs with no issues. If I could see the temp logs, I could assess but unable to see it. Any assistance will be greatly appreciated!
Thank you
Metadata
Metadata
Assignees
Labels
No labels