npm install errors / gulp no command known


  • | 2128 points

    I get the following when trying npm install - any ideas?
    Or is this a known problem

    C:\laragon\www\newtest (master) 07.01.2016 15:31:48,86
    λ npm install
    npm WARN deprecated lodash@1.0.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
    npm WARN optional dep failed, continuing fsevents@1.0.6
    npm WARN optional dep failed, continuing fsevents@1.0.6
    npm WARN optional dep failed, continuing fsevents@1.0.6

    expect@1.13.4 postinstall C:\laragon\www\newtest\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\expect
    node ./npm-scripts/postinstall.js
    npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm

    utf-8-validate@1.2.1 install C:\laragon\www\newtest\node_modules\laravel-elixir\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate
    node-gyp rebuild
    C:\laragon\www\newtest\node_modules\laravel-elixir\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate {git} 07.01.2016 15:44:04,37
    {lamb} if not defined npm_config_node_gyp (node "C:\laragon\bin\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
    gyp ERR! configure error
    gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
    gyp ERR! stack at failNoPython (C:\laragon\bin\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14)
    gyp ERR! stack at C:\laragon\bin\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11
    gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
    gyp ERR! System Windows_NT 6.1.7601
    gyp ERR! command "C:\laragon\bin\nodejs\node.exe" "C:\laragon\bin\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
    gyp ERR! cwd C:\laragon\www\newtest\node_modules\laravel-elixir\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate
    gyp ERR! node -v v4.2.3
    gyp ERR! node-gyp -v v3.0.3
    gyp ERR! not ok

    bufferutil@1.2.1 install C:\laragon\www\newtest\node_modules\laravel-elixir\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
    node-gyp rebuild
    C:\laragon\www\newtest\node_modules\laravel-elixir\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil {git} 07.01.2016 15:44:05,34
    {lamb} if not defined npm_config_node_gyp (node "C:\laragon\bin\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
    gyp ERR! configure error
    gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
    gyp ERR! stack at failNoPython (C:\laragon\bin\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14)
    gyp ERR! stack at C:\laragon\bin\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11
    gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
    gyp ERR! System Windows_NT 6.1.7601
    gyp ERR! command "C:\laragon\bin\nodejs\node.exe" "C:\laragon\bin\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
    gyp ERR! cwd C:\laragon\www\newtest\node_modules\laravel-elixir\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
    gyp ERR! node -v v4.2.3
    gyp ERR! node-gyp -v v3.0.3
    gyp ERR! not ok
    npm WARN optional dep failed, continuing utf-8-validate@1.2.1
    npm WARN optional dep failed, continuing bufferutil@1.2.1

    spawn-sync@1.0.15 postinstall C:\laragon\www\newtest\node_modules\laravel-elixir\node_modules\gulp-sass\node_modules\node-sass\node_modules\cross-spawn\node_modules\spawn-sync
    node postinstall


  • | 266 points

    @soup said:

    gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

    Seems you dont have python installed.

    This thread has some solutions.

    If you do have python installed make sure its not too deep (ie the path to it is not too long).

    Again comments at the bottom of the below thread talk about how to fix this problem

    http://stackoverflow.com/questions/15126050/running-python-on-windows-for-node-js-dependencies


  • administrators
    | 59056 points


  • | 2128 points

    Actually the install python (have used version 2.7.3) seems to have done the trick.
    Installed python, run the command
    npm install

    then (you get a warning about lodash)
    npm install --global gulp

    then run the command
    gulp

    and wow my scss file now actually gets converted to css
    Super, thanks for the help peeps


  • administrators
    | 59056 points

    @soup: You're so lucky. I think you are on Windows 10, and Microsoft listens and updates the OS constantly. I will make Laragon more convenient to Nodejs related projects.


  • | 2128 points

    Nope still on Windows 7 here
    ...and amazed that its actually working too :)


  • administrators
    | 59056 points

    Thanks for let us know. Like I said you are so lucky :)


  • | 143 points

    I had the same issue except it was due to the fact that npm install couldn't run properly due to windows long filenames.

    If Laragon isn't installed onto your drive root you might end up in the same situation I was. I fixed it by making a symlink to my installation folder.

    cd c:
    c:
    mklink /D [project name] [path to laragon project folder]
    

    Simply replace le brackets with the proper project name and full path.
    Hope this can help someone else that is unable to fix the issue by simply running @soup solution.

    Seems to be an issue with NPM more over than Laragon.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.