-
Notifications
You must be signed in to change notification settings - Fork 819
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
Error on install of CLI: root has no permissions to node_modules/fsevents #783
Comments
The CLI will install correctly and is not a blocker, but it will throw those warnings and show an error stack for fsevents installation which is a dev dependency and shouldn't affect the CLI workflows. |
same issue,+1 |
I had this issue when my node was installed using Homebrew on my mac (and hence the need to use sudo for npm install -g). I no longer had this error after I switched to nvm. Approximate procedure:
note: sudo no longer required for global npm installs. Hope this helps. |
FYI. I hit a similar error on another package (not amplify-cli), which required switch from node 10 to node 8. Seems any library that uses fsevents needs to have a specific matching version of node depending on the fsevents version. I also saw |
THANK YOU @leantide ! |
As @leantide mentioned above these warnings are tied to a specific version of node + the fsevents pacakge. This in no way affects the installation and usage of the CLI. |
The procedure of @leantide worked for me. Basically getting rid of node completely through brew but also removing it from /usr/local/bin/node and /usr/local/bin/node_modules and THEN SOLELY relying on nvm installed through curl as leantide details worked |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Describe the bug
Trying install the latest version fo the CLI on Mac
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Install the latest version 0.1.44
Screenshots
(attached)
Desktop (please complete the following information):
Smartphone (please complete the following information):
n/a
Additional context
Although, the install appears to fail installation, the $ amplify init command DOES work. Not sure if completely installed or not.
[Results]
`sudo npm install -g @aws-amplify/cli
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/usr/local/bin/amplify -> /usr/local/lib/node_modules/@aws-amplify/cli/bin/amplify
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for fsevents@1.2.7 and node@8.12.0 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents/lib'
gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/denhills/.node-gyp/8.12.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents/.node-gyp'
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" "--module_name=fse" "--module_path=/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents
node-pre-gyp ERR! node -v v8.12.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
npm WARN graphql-import@0.4.5 requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/@aws-amplify/cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 install:
node install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
added 1879 packages from 1301 contributors in 37.612s
Ξ ~ git:(master) ▶`
The text was updated successfully, but these errors were encountered: