我真的不知道是什么原因导致 npm 在我的 wsl 上无法正常工作。我的项目位于,/home/username/BISECT../...
但这似乎给了我一个提示EPERM: operation not permitted, rmdir '\\wsl.localhost\Ubuntu\home\oliver\BISECTHOSTING\website\node_modules\@vue\compiler-core'
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated [email protected]: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.
npm WARN deprecated [email protected]: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup '\\\\wsl.localhost\\Ubuntu\\home\\oliver\\BISECTHOSTING\\website\\node_modules\\@vue',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir '\\wsl.localhost\Ubuntu\home\oliver\BISECTHOSTING\website\node_modules\@vue\compiler-core'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: '\\\\wsl.localhost\\Ubuntu\\home\\oliver\\BISECTHOSTING\\website\\node_modules\\@vue\\compiler-core'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path \\wsl.localhost\Ubuntu\home\oliver\BISECTHOSTING\website\node_modules\@vuelidate\core\node_modules\vue-demi
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./scripts/postinstall.js
答案1
这是因为我没有使用特定版本的 node。我已经通过 nvm 安装了 node,但尚未指定必须使用的 node 版本。
所以当我输入node -v
它是未定义的或类似的东西