Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Install error #919

Closed
sridwan opened this issue May 2, 2015 · 7 comments
Closed

Install error #919

sridwan opened this issue May 2, 2015 · 7 comments

Comments

@sridwan
Copy link

sridwan commented May 2, 2015

ubuntu 14.04
node v0.12.2 (compile from source)
npm v2.7.4

when installing node-sass locally npm install node-sass, got this error:

-
> [email protected] install /root/sandbox/node_modules/node-sass
> node scripts/install.js

module.js:338
    throw err;
          ^
Error: Cannot find module '/root/sandbox/node_modules/node-sass/scripts/install.js'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3
npm ERR! Linux 3.13.0-49-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-sass"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node scripts/install.js'.

Tried [email protected], same error.

But when install globally npm install -g node-sass install successful.

It will be helpful if can install locally per project.
Any help / hints would be very appreciated.

@saper
Copy link
Member

saper commented May 2, 2015

Is npm install node-sass@beta any better? (without 2.0.0)

@sridwan
Copy link
Author

sridwan commented May 2, 2015

npm install node-sass@beta

Yes the error is exactly the same

npm ERR! [email protected] install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node scripts/install.js'.

@saper
Copy link
Member

saper commented May 2, 2015

Can you post a whole log including your command to gist.github.org? use script if you can
L

@sridwan
Copy link
Author

sridwan commented May 2, 2015

https://gist.github.com/sridwan/076b57741481d219b94b

I've upload npm-debug.log for both npm install node-sass and npm install node-sass@beta

@saper
Copy link
Member

saper commented May 2, 2015

Can you try: npm install --unsafe-perm node-sass@beta

or try as usual but not as root?

@sridwan
Copy link
Author

sridwan commented May 2, 2015

Yes, it installs succesfully.

@saper
Copy link
Member

saper commented May 2, 2015

So I think you have a normal behaviour of npm - it refuses to run scripts as root unless you tell it --unsafe-perm or configure it in .npmrc. -g works because it's difficult to do this on a typical system without being root.

I think we can close this because it is not specific to node-sass at all.

@sridwan sridwan closed this as completed May 2, 2015
jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants