Question

Deploying a Node App fails with 'node ': No such file or directory

I’m trying to deploy a node app and getting the following error:

[2021-11-26 01:46:05] => Building app
[2021-11-26 01:46:05] 
[2021-11-26 01:46:05] ---> Node.js Buildpack
[2021-11-26 01:46:05] ---> Installing toolbox
[2021-11-26 01:46:05] ---> - jq
[2021-11-26 01:46:06] ---> - yj
[2021-11-26 01:46:07] ---> Getting Node version
[2021-11-26 01:46:07] ---> Resolving Node version
[2021-11-26 01:46:09] ---> Downloading and extracting Node v17.1.0
[2021-11-26 01:46:24] ---> Parsing package.json
[2021-11-26 01:46:25] ---> No file to start server
[2021-11-26 01:46:25] ---> either use 'docker run' to start container or add index.js or server.js
[2021-11-26 01:46:25] Project contains package-lock.json, using npm
[2021-11-26 01:46:25] Using npm v8.1.2. To configure a different version of npm, set the engines.npm property in package.json.
[2021-11-26 01:46:25]   See https://do.co/apps-buildpack-node for further instructions.
[2021-11-26 01:46:25] Installing node_modules using npm (from package-lock.json)
[2021-11-26 01:46:26] Running npm ci
[2021-11-26 01:46:26] 
[2021-11-26 01:46:38] 
[2021-11-26 01:46:38] added 385 packages, and audited 386 packages in 12s
[2021-11-26 01:46:38] 
[2021-11-26 01:46:38] 107 packages are looking for funding
[2021-11-26 01:46:38]   run `npm fund` for details
[2021-11-26 01:46:38] 
[2021-11-26 01:46:38] found 0 vulnerabilities
[2021-11-26 01:46:38] npm notice 
[2021-11-26 01:46:38] npm notice New patch version of npm available! 8.1.2 -> 8.1.4
[2021-11-26 01:46:38] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.1.4>
[2021-11-26 01:46:38] npm notice Run `npm install -g npm@8.1.4` to update!
[2021-11-26 01:46:38] npm notice 
[2021-11-26 01:46:38] 
[2021-11-26 01:46:40] Running custom build command: npm run build
[2021-11-26 01:46:40] 
[2021-11-26 01:46:40] > build
[2021-11-26 01:46:40] > remix build
[2021-11-26 01:46:40] 
[2021-11-26 01:46:40] /usr/bin/env: 'node ': No such file or directory
[2021-11-26 01:46:40] building: exit status 127
[2021-11-26 01:46:40] ERROR: failed to build: exit status 1
[2021-11-26 01:46:42] 
[2021-11-26 01:46:42] For documentation on the buildpacks used to build your app, please see:
[2021-11-26 01:46:42]    Node.js: https://do.co/apps-buildpack-node
[2021-11-26 01:46:42] 
[2021-11-26 01:46:42]  ! Build failed (145)

Seems strange that node wouldn’t be available given the output seems to indicate that Node v17.1.0 was just downloaded.

Any ideas?


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

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hey there!

Does your application require a specific version of Node be used? Is it compatible with version 17 locally? Also in your configuration for your local build are you specifying a specific path to your Node binary?

Nate