homstead虚拟机,在项目目录下执行命令:
yarn add jquery --save
执行过程中出现如下错误:
yarn add jquery --save
yarn add v0.18.0
info No lockfile found.
[1/4] Resolving packages...
warning laravel-elixir > browserify > glob > 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 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-phpunit > gulp-messenger > chalkline@0.0.4: No longer sponsored by CT - please visit http://niftylettuce.com for more info
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/add for documentation about this command.
初步判断时symlink的问题,之前在执行 npm install 命令时也出现相类似的问题,索性执行
yarn add jquery --save --no-bin-links
执行完毕后,能够正常安装jquery。