Closed kalak-sudo closed 4 years ago
Looks like you installed Node.js in a way that requires root permissions to install global NPM packages. So, just like your username, you need to prefix the command with sudo :)
(You might want to re-install Node.js in a way that it doesn’t require doing this - for example using NVM)
I have tried again the way you said, with NVM and got this in the log:
21372 info lifecycle node-sass@4.13.0~postinstall: node-sass@4.13.0
21373 verbose lifecycle node-sass@4.13.0~postinstall: unsafe-perm in lifecycle false
21374 verbose lifecycle node-sass@4.13.0~postinstall: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/lib/node_modules/hereditas/node_modules/node-sass/node_modules/.bin:/usr/lib/node_modules/hereditas/node_modules/.bin:/usr/lib/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
21375 verbose lifecycle node-sass@4.13.0~postinstall: CWD: /usr/lib/node_modules/hereditas/node_modules/node-sass
21376 silly lifecycle node-sass@4.13.0~postinstall: Args: [ '-c', 'node scripts/build.js' ]
21377 silly lifecycle node-sass@4.13.0~postinstall: Returned: code: 1 signal: null
21378 info lifecycle node-sass@4.13.0~postinstall: Failed to exec postinstall script
21379 timing action:postinstall Completed in 1017ms
21380 verbose unlock done using /root/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
21381 timing stage:rollbackFailedOptional Completed in 1570ms
21382 timing stage:runTopLevelLifecycles Completed in 25207ms
21383 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/hereditas/node_modules/fsevents):
21384 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
21385 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
21385 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
21385 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
21385 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
21386 verbose stack Error: node-sass@4.13.0 postinstall: `node scripts/build.js`
21386 verbose stack Exit status 1
21386 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
21386 verbose stack at EventEmitter.emit (events.js:198:13)
21386 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
21386 verbose stack at ChildProcess.emit (events.js:198:13)
21386 verbose stack at maybeClose (internal/child_process.js:982:16)
21386 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
21387 verbose pkgid node-sass@4.13.0
21388 verbose cwd /root
21389 verbose Linux 4.15.0-20-generic
21390 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "--global" "hereditas"
21391 verbose node v10.17.0
21392 verbose npm v6.11.3
21393 error code ELIFECYCLE
21394 error errno 1
21395 error node-sass@4.13.0 postinstall: `node scripts/build.js`
21395 error Exit status 1
21396 error Failed at the node-sass@4.13.0 postinstall script.
21396 error This is probably not a problem with npm. There is likely additional logging output above.
21397 verbose exit [ 1, true ]
Looks that is something at the "postinstall"
What version of Node.js are you using through NVM?
I'll look into this in the evening
node v10.17.0 npm v6.11.3
Ok, thanks!!
I can't repro this :( Using Node.js 12 or 10 on macOS (Catalina), the installation succeedes for me:
~ nvm use 10
Now using node v10.17.0 (npm v6.11.3)
~ npm install --global hereditas
npm WARN deprecated superagent@3.8.3: Please note that v5.0.1+ of superagent removes User-Agent header by default, therefore you may need to add it yourself (e.g. GitHub blocks requests without a User-Agent header). This notice will go away with v5.0.2+ once it is released.
/Users/alessandro/.nvm/versions/node/v10.17.0/bin/hereditas -> /Users/alessandro/.nvm/versions/node/v10.17.0/lib/node_modules/hereditas/bin/run
> fsevents@1.2.9 install /Users/alessandro/.nvm/versions/node/v10.17.0/lib/node_modules/hereditas/node_modules/fsevents
> node install
node-pre-gyp WARN Using request for node-pre-gyp https download
[fsevents] Success: "/Users/alessandro/.nvm/versions/node/v10.17.0/lib/node_modules/hereditas/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" is installed via remote
> node-sass@4.13.0 install /Users/alessandro/.nvm/versions/node/v10.17.0/lib/node_modules/hereditas/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.0/darwin-x64-64_binding.node
Download complete░░⸩ ⠋ :
Binary saved to /Users/alessandro/.nvm/versions/node/v10.17.0/lib/node_modules/hereditas/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Caching binary to /Users/alessandro/.npm/node-sass/4.13.0/darwin-x64-64_binding.node
> node-sass@4.13.0 postinstall /Users/alessandro/.nvm/versions/node/v10.17.0/lib/node_modules/hereditas/node_modules/node-sass
> node scripts/build.js
Binary found at /Users/alessandro/.nvm/versions/node/v10.17.0/lib/node_modules/hereditas/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine
+ hereditas@0.1.1
added 813 packages from 444 contributors in 48.347s
Closed for inactivity
Hi!
I am trying to intall Hereditas but I can't. I have tried it on Mac and Ubuntu 18.04, both with node v10.17.0.
The error I always get is the following after typing "npm install --global hereditas". What I am doing wrong? Or how can I get it to work?
Thanks in advanced.