Error: Cannot find module 'async-each'

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/you23hai45/article/details/80949651

1、错误描述

Error: Cannot find module 'async-each'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
    at Function.Module._load (internal/modules/cjs/loader.js:520:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (D:\njws\vue-multiselect-master\node_modules\chokidar\
index.js:5:17)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (D:\njws\vue-multiselect-master\node_modules\watchpack
\lib\DirectoryWatcher.js:7:16)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at WatcherManager.getDirectoryWatcher (D:\njws\vue-multiselect-master\node_m
odules\watchpack\lib\watcherManager.js:12:25)
    at WatcherManager.watchFile (D:\njws\vue-multiselect-master\node_modules\wat
chpack\lib\watcherManager.js:26:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator.USER-0GUONPPBHK\AppData\Roaming\npm-cache\_l
ogs\2018-07-07T02_59_29_393Z-debug.log

D:\njws\vue-multiselect-master>

2、错误原因

     由错误提示可知,是少了async-each模块,但是使用npm install async-each进行安装,安装不成功

D:\njws\vue-multiselect-master>npm install async-each
npm WARN checkPermissions Missing write access to D:\njws\vue-multiselect-master
\node_modules\async-each
npm WARN checkPermissions Missing write access to D:\njws\vue-multiselect-master
\node_modules\async-foreach
npm WARN checkPermissions Missing write access to D:\njws\vue-multiselect-master
\node_modules\gaze
npm WARN checkPermissions Missing write access to D:\njws\vue-multiselect-master
\node_modules\in-publish
npm WARN checkPermissions Missing write access to D:\njws\vue-multiselect-master
\node_modules\lodash.assign
npm WARN checkPermissions Missing write access to D:\njws\vue-multiselect-master
\node_modules\lodash.clonedeep
npm WARN checkPermissions Missing write access to D:\njws\vue-multiselect-master
\node_modules\lodash.mergewith
npm WARN checkPermissions Missing write access to D:\njws\vue-multiselect-master
\node_modules\node-sass
npm WARN @vue/[email protected] requires a peer of vue-server-renderer@2.
x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of babel-core@^6.0.0 but none is ins
talled. You must install peer dependencies yourself.

npm ERR! path D:\njws\vue-multiselect-master\node_modules\async-each
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'D:\njws\vue-multisele
ct-master\node_modules\async-each'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator.USER-0GUONPPBHK\AppData\Roaming\npm-cache\_l
ogs\2018-07-07T03_05_20_797Z-debug.log

D:\njws\vue-multiselect-master>

3、解决办法

     删除项目之后,再次安装cnpm install,出现了操作不被允许

C:\Users\Administrator.USER-0GUONPPBHK>cd D:\njws\vue-multiselect-master

C:\Users\Administrator.USER-0GUONPPBHK>d:

D:\njws\vue-multiselect-master>cnpm install
× Install fail! Error: EPERM: operation not permitted, symlink 'D:\njws\vue-mul
tiselect-master\node_modules\[email protected]@babel-helpe
r-vue-jsx-merge-props' -> 'D:\njws\vue-multiselect-master\node_modules\babel-hel
per-vue-jsx-merge-props'
Error: EPERM: operation not permitted, symlink 'D:\njws\vue-multiselect-master\n
ode_modules\[email protected]@babel-helper-vue-jsx-merge-p
rops' -> 'D:\njws\vue-multiselect-master\node_modules\babel-helper-vue-jsx-merge
-props'
npminstall version: 3.3.0
npminstall args: D:\nodejs\node.exe C:\Users\Administrator.USER-0GUONPPBHK\AppDa
ta\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js --china
--userconfig=C:\Users\Administrator.USER-0GUONPPBHK\.cnpmrc --disturl=https://np
m.taobao.org/mirrors/node --registry=https://registry.npm.taobao.org

D:\njws\vue-multiselect-master>

猜你喜欢

转载自blog.csdn.net/you23hai45/article/details/80949651