NativeScript / NativeScript/nativescript-cli
NPM not working under any circumstances
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 204
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 8
描述
Hello,
I am trying to run NPM on my Mac but it is having the same issue. I have followed all the steps to try and fix this, but when I install after un-insttalling, I get npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
And I cannot run the npm to local host. When I try using npm run, I get this;
npm run
Lifecycle scripts included in react-redux-router:
preinstall
npm set audit false
start
webpack-dev-server --config webpack/dev.config.js --watch
available via npm run-script:
build
cross-env NODE_ENV=production webpack --config webpack/prod.config.js --progress --display-error-details --color
heroku-postbuild
npm run build
precommit
eslint src
prod
NODE_ENV=production node server.js
I tried to run delete node_modules but it said I did not recognize the command. Both NPM and Node are updated to their lastest updated versions, npm at 6.14.5 and node at v14.5.0. My mac is running Catalina 10.15.5. Any idea why this is happening or how I can fix it?
Describe the bug
To Reproduce
I just go into my npm and try to start it or run it and I get the output above.
Expected behavior
for it to run my project on localhost:3000 so I can see my work
Sample project
Additional context
Please let me know if you have any questions.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
报告提到 npm 6.14.5、Node v14.5.0、macOS Catalina,以及一个使用 webpack/dev.config.js 的 React 项目。首先重现 /usr/local/lib/node_modules 的 EACCES 错误和 npm run 失败,然后确定问题属于 NativeScript CLI 还是本地 npm 权限。确认了项目特定的复现,并验证了 localhost 启动路径后,才算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, node.js
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 15/100