【发布时间】:2018-09-21 16:21:23
【问题描述】:
我用的是mac
我尝试运行我的第一个 ionic 项目,但在我的 mac 中运行它时遇到错误
我正在将我遵循的所有步骤放入终端 -
- 开始于 - : $ ionic start MyIonicProject 教程
- $cd MyIonicProject
- $ionic 服务
然后我收到错误
Error: EACCES: permission denied, open '/Users/user/.ionic/helper.log'
> ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[INFO] Looks like @ionic/app-scripts isn't installed in this project.
This package is required for this command to work properly.
? Install @ionic/app-scripts? Yes
> npm i -D -E @ionic/app-scripts
npm WARN deprecated hoek@2.16.3: The major version is no longer supported. Please update to 4.x or newer
npm WARN checkPermissions Missing write access to /Users/user/Projects/MyIonicProject/node_modules
npm WARN checkPermissions Missing write access to /Users/user/Projects/MyIonicProject/node_modules/@ionic
npm ERR! path /Users/user/Projects/MyIonicProject/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/user/Projects/MyIonicProject/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/Users/user/Projects/MyIonicProject/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/Users/user/Projects/MyIonicProject/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/user/Projects/MyIonicProject/node_modules' }
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 (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-09-21T06_24_56_379Z-debug.log
users-MacBook-Pro-3:MyIonicProject user$
【问题讨论】:
-
尝试使用“npm install”安装节点依赖项
-
我已经在应用程序中有 node_module 文件夹,你的这个解决方案对我没有帮助