NPM 和 yarn
win 10
表示每次一碰到 npm 和 yarn 的时候都好多问题,之前第一个教程装的homesead,到了npm和yarn那里执行就很多warn和error,当时觉得里面用的比较多的是编译css,为了顺利推进,手动改一下css就算了。
上周末刚重新装了一边homestead,今天到这里的时候依然n多warn和error,不知道后面能否顺利完成,:disappointed_relieved:
vagrant@homestead:~/code/wepy-weui-demo$ yarn
yarn install v1.7.0
info No lockfile found.
[1/4] Resolving packages...
warning babel-preset-es2015@6.24.1: ???? Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
warning eslint > file-entry-cache > flat-cache > circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
warning wepy-plugin-imagemin > imagemin-mozjpeg > mozjpeg > bin-build > download > gulp-decompress > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > eslint-config-standard@7.1.0" has incorrect peer dependency "eslint-plugin-promise@>=3.3.0".
warning " > wepy-compiler-less@1.3.14" has unmet peer dependency "less@^3.8.1".
error An unexpected error occurred: "EPROTO: protocol error, symlink '../acorn/bin/acorn' -> '/home/vagrant/code/wepy-weui-demo/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/wepy-weui-demo/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
vagrant@homestead:~/code/wepy-weui-demo$ wepy build
{ Error: Cannot find module 'less'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/vagrant/code/wepy-weui-demo/node_modules/wepy-compiler-less/lib/index.js:20:13)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.load (/usr/local/share/.config/yarn/global/node_modules/wepy-cli/lib/loader.js:113:17)
at Object.loadCompiler (/usr/local/share/.config/yarn/global/node_modules/wepy-cli/lib/loader.js:69:29)
at Object.checkCompiler (/usr/local/share/.config/yarn/global/node_modules/wepy-cli/lib/compile.js:178:35)
at Object.init (/usr/local/share/.config/yarn/global/node_modules/wepy-cli/lib/compile.js:221:19) code: 'MODULE_NOT_FOUND' }
[WARNING] 找不到编译器:wepy-compiler-less。
[10:46:20] [信息] 检测到有效NPM包资源,正在尝试安装,请稍等。
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN rollback Rolling back acorn-jsx@3.0.1 failed (this is probably harmless): ETXTBSY: text file is busy, unlink '/home/vagrant/code/wepy-weui-demo/node_modules/acorn-jsx/package.json.3911671089'
vagrant@homestead:~/code/wepy-weui-demo$ npm install
npm WARN deprecated babel-preset-es2015@6.24.1: ? Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN rollback Rolling back babel-runtime@6.26.0 failed (this is probably harmless): ETXTBSY: text file is busy, unlink '/home/vagrant/code/wepy-weui-demo/node_modules/babel-generator/node_modules/babel-runtime/package.json.2144866086'
npm WARN rollback Rolling back babel-runtime@6.26.0 failed (this is probably harmless): ETXTBSY: text file is busy, unlink '/home/vagrant/code/wepy-weui-demo/node_modules/babel-helper-bindify-
vagrant@homestead:~/code/wepy-weui-demo$ npm install less --save
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN rollback Rolling back asap@2.0.6 failed (this is probably harmless): ETXTBSY: text file is busy, unlink '/home/vagrant/code/wepy-weui-demo/node_modules/asap/package.json.441995234'
npm WARN rollback Rolling back assert-plus@1.0.0 failed (this is probably harmless): ETXTBSY: text file is busy, unlink '/home/vagrant/code/wepy-weui-demo/node_modules/assert-plus/package.json.1634628732'
npm WARN rollback Rolling back asynckit@0.4.0 failed (this is probably harmless): ETXTBSY: text f
社区里面找了一些方法,没能解决问题。
推荐文章: