Compile error: Error: Can not find module 'chalk'

Linux compiler error: Error: Can not find module 'chalk'

Because change directory or more dependent reinstalled.


1. When the input npm run *, the compiler is reported the following error

15792099-281a03fe758ce180.png

2. Solution (personal recommendation second)

  1. delete the code directory, re-deploy code

or:

  2. delete the original node_modules rely reinstall, (execute two commands)

     rm -rf node_modules

     npm install

15792099-c7a14f17fa993f37.png

3. recompile

15792099-a5d0bee12f69e313.png

Compile successful! carry out

Reproduced in: https: //www.jianshu.com/p/c95f19046d1b

Guess you like

Origin blog.csdn.net/weixin_33957648/article/details/91199934