Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failed - opencollective-postinstall: Permission denied #140

Open
kumanoko24 opened this issue Mar 27, 2021 · 2 comments
Open

Comments

@kumanoko24
Copy link

Command and Log:

$ npm i -g docsify-cli

/root/.nvm/versions/node/v14.15.1/bin/docsify -> /root/.nvm/versions/node/v14.15.1/lib/node_modules/docsify-cli/bin/docsify

> [email protected] postinstall /root/.nvm/versions/node/v14.15.1/lib/node_modules/docsify-cli/node_modules/docsify
> opencollective-postinstall

sh: 1: opencollective-postinstall: Permission denied
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/docsify-cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] postinstall: `opencollective-postinstall`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-03-27T09_10_53_098Z-debug.log

At the docsify's post-install phase in debug.log:

5745 silly postinstall [email protected]
5746 info lifecycle [email protected]~postinstall: [email protected]
5747 verbose lifecycle [email protected]~postinstall: unsafe-perm in lifecycle false
5748 verbose lifecycle [email protected]~postinstall: PATH: /root/.nvm/versions/node/v14.15.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/root/.nvm/versions/node/v14.15.1/lib/node_modules/docsify-cli/node_modules/docsify/node_modules/.bin:/root/.nvm/versions/node/v14.15.1/lib/node_modules/docsify-cli/node_modules/.bin:/root/.nvm/versions/node/v14.15.1/lib/node_modules/.bin:/root/bin:/root/.vscode-server/bin/2b9aebd5354a3629c3aba0a5f5df49f43d6689f8/bin:/root/bin:/root/.nvm/versions/node/v14.15.1/bin:/root/.vscode-server/bin/2b9aebd5354a3629c3aba0a5f5df49f43d6689f8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
5749 verbose lifecycle [email protected]~postinstall: CWD: /root/.nvm/versions/node/v14.15.1/lib/node_modules/docsify-cli/node_modules/docsify
5750 silly lifecycle [email protected]~postinstall: Args: [ '-c', 'opencollective-postinstall' ]
5751 info lifecycle [email protected]~postinstall: Failed to exec postinstall script
5752 timing action:postinstall Completed in 149ms
5753 verbose unlock done using /root/.npm/_locks/staging-5069969764c9560c.lock for /root/.nvm/versions/node/v14.15.1/lib/node_modules/.staging
5754 timing stage:rollbackFailedOptional Completed in 379ms
5755 timing stage:runTopLevelLifecycles Completed in 8086ms
5756 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/docsify-cli/node_modules/chokidar/node_modules/fsevents):
5757 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5758 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
5758 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
5758 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
5758 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
5759 verbose stack Error: [email protected] postinstall: `opencollective-postinstall`
5759 verbose stack spawn ENOENT
5759 verbose stack     at ChildProcess.<anonymous> (/root/.nvm/versions/node/v14.15.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
5759 verbose stack     at ChildProcess.emit (events.js:315:20)
5759 verbose stack     at maybeClose (internal/child_process.js:1048:16)
5759 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
5760 verbose pkgid [email protected]
5761 verbose cwd /root/Works/fst-logic-centre
5762 verbose Linux 4.15.0-91-generic
5763 verbose argv "/root/.nvm/versions/node/v14.15.1/bin/node" "/root/.nvm/versions/node/v14.15.1/bin/npm" "i" "-g" "docsify-cli"
5764 verbose node v14.15.1
5765 verbose npm  v6.14.8
5766 error code ELIFECYCLE
5767 error syscall spawn
5768 error file sh
5769 error errno ENOENT
5770 error [email protected] postinstall: `opencollective-postinstall`
5770 error spawn ENOENT
5771 error Failed at the [email protected] postinstall script.
5771 error This is probably not a problem with npm. There is likely additional logging output above.
5772 verbose exit [ 1, true ]
@sy-records
Copy link
Member

Can you try this?

npm i -g docsify-cli --unsafe-perm=true --allow-root

@trusktr
Copy link
Member

trusktr commented Jan 12, 2022

Not sure how your system is configured, but normally people install globally using sudo (builtin command in Linux and macOS) for admin/root permissions:

sudo npm i -g docsify-cli

Can you try that? Not sure how else to help you yet. Something is different on your system than normal, it seems. Let us know if those alternatives work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants