Npm install in the theme folder

Hi,
I am an old user of roots theme, now i would like to move to sage, but when i try to run npm install in my theme directory I have some errors.
I already tried with the Npm Debugging Guidelines, but this doesn’t works for me.
I tried also npm install -g npm@latest and then run npm install again, but also this doesn’t works for me.
I’m using a lot of sudo command, I’m not sure if that was the cause of any of my troubles.
I tried to find a solution on this forum, on stackoverflow and github.
can you help me to understand where it is the issue?
this is my npm-debug-log

Thanks in advance
Mattia

i went ahead, giving no weight to the error, I run “bower install” and a try to run “gulp”.
gulp works fine, but i have this error:

[14:11:35] Error: Cannot find module 'deep-extend'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/user/Desktop/sage3/sage/node_modules/gulp-pleeease/node_modules/pleeease/lib/options.js:3:14)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

So i tried also to install this deep-module with this “npm install deep-extend” and after I run gulp again, but I have this other error:

[14:19:27] Error: Cannot find module 'postcss'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/user/Desktop/sage3/sage/node_modules/gulp-pleeease/node_modules/pleeease/lib/pleeease.js:5:20)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    indent preformatted text by 4 spaces

What can I try to do?
thanks

Seems like you’re just running into problems with packages not fully downloading. You sure that removing node_modules and running npm install again doesn’t work?

I tried also this way, I think that i will try in another machine.
i will let you know
thanks

I solved my issue, following this guide https://docs.npmjs.com/getting-started/fixing-npm-permissions
Also delete the node_modules folder and after run again this: npm cache clear && rm -rf node_modules && npm install.
I hope this can help someone else.
thanks

1 Like

I have same issue. cant install “npm install” in my sage theme folder. Getting errors.

I tried all these solution from Mattia but still the same.

please check my npm debug log file

npm ERR! Darwin 14.0.0
npm ERR! argv “node” “/usr/local/bin/npm” "install"
npm ERR! node v0.12.1
npm ERR! npm v2.7.3

npm ERR! null == true
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Darwin 14.0.0
npm ERR! argv “node” “/usr/local/bin/npm” "install"
npm ERR! node v0.12.1
npm ERR! npm v2.7.3

npm ERR! null == true
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Darwin 14.0.0
npm ERR! argv “node” “/usr/local/bin/npm” "install"
npm ERR! node v0.12.1
npm ERR! npm v2.7.3

npm ERR! null == true
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

Looks like a possible network / proxy issue? This isn’t a Sage problem, so please do some more debugging and searching. Try Googling some of the errors you see in the log.

This topic was automatically closed after 3 hours. New replies are no longer allowed.