首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >向工作区添加React失败,EACCES:权限被拒绝,mkdir '/home/mint/.cache/Cypress‘

向工作区添加React失败,EACCES:权限被拒绝,mkdir '/home/mint/.cache/Cypress‘
EN

Stack Overflow用户
提问于 2019-06-19 22:26:38
回答 1查看 408关注 0票数 0

我正在尝试在空的nx工作区中添加@nrwl/react

因此,我使用:yarn create nx-workspace <app_name>创建一个空的nx工作区。

然后,当我执行yarn ng add @nrwl/react来添加React时,我会遇到这样的错误(即使是使用sudo):

代码语言:javascript
复制
> cypress@3.3.1 postinstall /home/mint/dev/Learn/Nx/my-app/node_modules/cypress
> node index.js --exec install

Cypress cannot write to the cache directory due to file permissions

See discussion and possible solutions at
https://github.com/cypress-io/cypress/issues/1281

----------

Failed to access /home/mint/.cache/Cypress:

EACCES: permission denied, mkdir '/home/mint/.cache/Cypress'

----------

Platform: linux (Linux Mint - )
Cypress Version: 3.3.1
npm WARN @ngtools/webpack@8.0.1 requires a peer of @angular/compiler-cli@>=8.0.0-beta.0 < 9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress@3.3.1 postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cypress@3.3.1 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!     /home/mint/.npm/_logs/2019-06-18T21_51_47_231Z-debug.log
Package install failed, see above.
Workspace creation failed, see above.

在我的本地机器上手动安装Cypress并不能解决这个问题。

EN

回答 1

Stack Overflow用户

发布于 2019-11-14 23:07:36

尝试使用以下命令创建应用程序:

代码语言:javascript
复制
sudo yarn create nx-workspace <app_name>
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56670062

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档