yarn install 报错,学习《Laravel 入门手册》遇到问题求帮助

vagrant@homestead:~/Code/sample$ yarn install
yarn install v0.18.1
info No lockfile found.
[1/4] Resolving packages...
warning gulp > vinyl-fs > glob-stream > minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning laravel-elixir > gulp-if > gulp-match > minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning laravel-elixir > gulp-phpspec > gulp-jshint > rcloader > lodash@2.4.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
warning laravel-elixir > gulp-sass > node-sass > lodash.assign@4.2.0: This package is deprecated. Use Object.assign.
warning laravel-elixir > gulp-sass > node-sass > sass-graph > yargs > lodash.assign@4.2.0: This package is deprecated. Use Object.assign.
warning laravel-elixir > gulp-phpunit > gulp-messenger > chalkline@0.0.4: No longer sponsored by CT - please visit http://niftylettuce.com for more info
warning gulp > vinyl-fs > glob-watcher > gaze > globule > lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
warning gulp > vinyl-fs > glob-watcher > gaze > globule > minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
warning laravel-elixir > gulp-sass > node-sass > sass-graph > yargs > yargs-parser > lodash.assign@4.2.0: This package is deprecated. Use Object.assign.
warning laravel-elixir > gulp-phpunit > gulp-messenger > purdy > chalk > has-color@0.1.7: Renamed to supports-color. If you're using chalk, upgrade to the latest version. https://github.com/chalk/supports-color
warning laravel-elixir > gulp-sass > node-sass > node-gyp > npmlog > gauge > has-color@0.1.7: Renamed to supports-color. If you're using chalk, upgrade to the latest version. https://github.com/chalk/supports-color
warning laravel-elixir > browser-sync > localtunnel > request > node-uuid@1.4.7: use uuid module instead
[2/4] Fetching packages...
warning fsevents@1.0.15: The platform "linux" is incompatible with this module.
info "fsevents@1.0.15" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../detective/node_modules/acorn/bin/acorn' -> '/home/vagrant/Code/sample/node_modules/acorn-jsx/node_modules/.bin/acorn'".
info If you think this is a bug, please open a bug report with the information provided in "/home/vagrant/Code/sample/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
本帖已被设为精华帖!
附言 1  ·  7年前

谷歌了一下,使用以下命令安装了,但下一步运行gulp后又报错了。
···
yarn install --save --no-bin-links
···

本帖由系统于 4年前 自动加精
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
shijf
最佳答案

假如运行了yarn instal 命令是报错【error An unexpected error occurred: "EPROTO: protocol error, symlink...】

2.执行以下命令:
2.1

$ rm -rf node_modules

2.2

$ yarn config set registry http://registry.cnpmjs.org

2.3

$ yarn install --no-bin-links

3.接下来打开 pakage.json 修改

"scripts":{
"dev": "npm run development",
"development": "NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},

4.执行$ npm run watch-poll或者npm run dev(我是执行的后者)
5.大功告成,希望能帮助到一起学习的小伙伴

6年前 评论
讨论数量: 8
shijf

假如运行了yarn instal 命令是报错【error An unexpected error occurred: "EPROTO: protocol error, symlink...】

2.执行以下命令:
2.1

$ rm -rf node_modules

2.2

$ yarn config set registry http://registry.cnpmjs.org

2.3

$ yarn install --no-bin-links

3.接下来打开 pakage.json 修改

"scripts":{
"dev": "npm run development",
"development": "NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},

4.执行$ npm run watch-poll或者npm run dev(我是执行的后者)
5.大功告成,希望能帮助到一起学习的小伙伴

6年前 评论

我是直接把 node_modules 那个文件夹删除了,然后重新 yarn 就解决了

7年前 评论

@M1racle 重新一下还是一样的错误!

7年前 评论

@念念补忘 这个就不是太了解了,可能需要查查了

7年前 评论

我也加了 yarn install --save --no-bin-links 就可以了~, 看看下一步了0-0

6年前 评论
shijf

假如运行了yarn instal 命令是报错【error An unexpected error occurred: "EPROTO: protocol error, symlink...】

2.执行以下命令:
2.1

$ rm -rf node_modules

2.2

$ yarn config set registry http://registry.cnpmjs.org

2.3

$ yarn install --no-bin-links

3.接下来打开 pakage.json 修改

"scripts":{
"dev": "npm run development",
"development": "NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},

4.执行$ npm run watch-poll或者npm run dev(我是执行的后者)
5.大功告成,希望能帮助到一起学习的小伙伴

6年前 评论

反复试了几次,终于成功了。初学者,出了问题实在是没有思路,只能靠各位大神了!!

6年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!