1

I have the following error when I try to run my node.js project:

ENV@ENV-L7490:/mnt/c/Users/ENV/source/Project$ npm i
: not foundram Files/nodejs/npm: 3: 
: not foundram Files/nodejs/npm: 5: 
/mnt/c/Program Files/nodejs/npm: 6: Syntax error: word unexpected (expecting "in")
ENV@ENV-L7490:/mnt/c/Users/ENV/source/Project$ npm init
: not foundram Files/nodejs/npm: 3: 
: not foundram Files/nodejs/npm: 5: 
/mnt/c/Program Files/nodejs/npm: 6: Syntax error: word unexpected (expecting "in")
ENV@ENV-L7490:/mnt/c/Users/ENV/source/Project$

Any idea what this means and how to resolve. I'm unable to actually run the project with npm start, until I run my npm i or npm init, which is why I want to get to the bottom of this.

3
  • 1
    please reinstall your node (npm) and try again that will work
    – test arbutus
    Commented Mar 24, 2021 at 13:43
  • Have you followed the installation guide? docs.npmjs.com/downloading-and-installing-node-js-and-npm
    – Braiam
    Commented Mar 24, 2021 at 13:52
  • Thanks for the response! In my git bash terminal, I'm able to run the program in the meantime. But after a re-install, it seemed to be working!
    – ENV
    Commented Mar 24, 2021 at 14:06

1 Answer 1

0

Suggest to use nvm instead, its convenient and personally I did not face above issue in WSL setup which following this: https://gist.github.com/noygal/6b7b1796a92d70e24e35f94b53722219

You must log in to answer this question.