0

i'm developing an application using nodejs and npm. I have Windows 10 and i'm using npm v.3.3.7 and node v.4.1.2.

To set them up i go through the next steps:

  1. Install NodeJs with npm
  2. Download Npm-master 3.3.7 from git and overwrite folder C:\Program Files\nodejs\node_modules\npm
  3. Added on Enviromental Variables C:\Users\bilias7\AppData\Roaming\npm;C:\Program Files\nodejs; for current user and for system PATH variable.

Till here everything works i can use both node and npm from CMD and with an elevated CMD I am able to install global packages.

The problem starts when i'm trying to install gulp-sass which has a dependency on node-sass. The command bellow returns an error that node is not recognized as an internal or external command.

npm install -g gulp-sass

As you can see in the error bellow the error returned by the installation of node-sass package.

'node' is not recognized as an internal or external command,
operable program or batch file.
npm WARN install:node-sass@3.3.3 node-sass@3.3.3 install: `node scripts/install.js`
npm WARN install:node-sass@3.3.3 Exit status 1
C:\Program Files\nodejs
└── (empty)

npm ERR! code 1

So i tried to explicit install node-sass using the bellow command

npm install -g node-sass

and I got the detailed error as bellow. I suppose that something goes wrong inside the install.js execution and it's not connected with command node but i can't figure out what is that.

C:\Program Files\nodejs\node-sass -> C:\Program Files\nodejs\node_modules\node-sass\bin\node-sass

> node-sass@3.3.3 install C:\Program Files\nodejs\node_modules\node-sass
> node scripts/install.js

'node' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "node-sass"
npm ERR! node v4.1.2
npm ERR! npm  v3.3.7
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.3.3 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.3.3 install script 'node scripts/install.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Windows\system32\npm-debug.log

Also you are able to download full log file from here

Any ideas is helpfull and welcome because i have already spent more than 20 hours on that!!

Bilias7
  • 129
  • 3
  • 12

1 Answers1

0

Possibly, nodejs is not added in your environment variable. Check - Node.js doesn't recognize system path?

Community
  • 1
  • 1
DexTer
  • 2,043
  • 1
  • 22
  • 45
  • Hello @DexTer I have added NodeJs in my Enviroment Variable also i have restart my pc after this configuration but no luck with that. Anyway thank you for your answer! – Bilias7 Oct 12 '15 at 20:48