question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gulp 4: env: node\r: No such file or directory

See original GitHub issue

Using gulp 4, I can build via the command line, but running the same as an npm script fails. e.g.

# succeeds
$ gulp

# this script simply runs "gulp", but fails with
# "env: node\r: No such file or directory"
$ npm run build

Other npm commands work, such as npm start which runs node index.

Any ideas on how to get a better error message to track this down?


gulp 4 OS X 10.11.6 node 6.4.0 npm 3.10.3


edit

Solution

Issue was with line endings in git

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
stramelcommented, Apr 13, 2017

AH LINE ENDINGS! Re-installed my entire dev environment 😅

0reactions
phatedcommented, May 24, 2017

Don’t use that package…

Read more comments on GitHub >

github_iconTop Results From Across the Web

env: node: No such file or directory in mac - Stack Overflow
I solved it this way: $ brew uninstall --force node $ brew uninstall --force npm. after it $ brew install node.
Read more >
env: node: No such file or directory when using nvm - YouTrack
Found a temporary workaround: just manually append $PATH with node from nvm in debug configuration environment variables. While that works, it is of...
Read more >
"/usr/bin/env: 'node': No such file or directory" even though it is ...
However, it tells me that node is not in my bin even though I downloaded the binary and added the location to my...
Read more >
npm --version /usr/bin/env: 'node': No such file or directory Code ...
Answers related to “npm --version /usr/bin/env: 'node': No such file or directory”. /usr/bin/env: 'bash\r': No such file or directory.
Read more >
node: No such file or directory' Error in IntelliJ IDEA File Watcher
This helped me with another related issue. Trying to run gulp tasks in our project resulted in the same error. Adding the PATH...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found