首页 > 解决方案 > create-react-app 在我的 ubuntu vagrant 机器上不起作用

问题描述

我现在已经在几个房子里尝试了这个,以便在我的 vagrant ubuntu (14) 盒子中安装和运行 react。

我已按照以下页面的说明进行操作(https://facebook.github.io/create-react-app/docs/getting-started

npx create-react-app my-app cd my-app npm start

每次我运行
yarn start 我都会收到以下错误消息

纱线运行v1.15.2错误无法写入文件“/var/www/html/my-app/yarn-error.log”:“EACCES:权限被拒绝,打开'/var/www/html/my-app/yarn- error.log'" 错误发生意外错误:"EACCES: 权限被拒绝,scandir '/home/vagrant/.config/yarn/link'"。info 访问https://yarnpkg.com/en/docs/cli/run以获取有关此命令的文档。

我试过

  1. 将权限更改为 +x 但问题似乎并没有消失。
  2. 从 npm 卸载 create-react 并仅使用 yarn 的 create-react。

我确信人们正在流浪机器上对 ubuntu 做出反应。我在这里想念什么?

标签: ubuntuvagrantcreate-react-app

解决方案


推荐阅读