Tag Archives: cannot find module XXX

VUE Error: Cannot find module ‘webpack/bin/config-yargs’

For a Vue project downloaded from the Internet, when the terminal executes NPM run dev, an error is reported, as shown in the figure below:

As can be seen from the above error report, webpack cli needs to be installed

Terminal input: NPM install webpack cli

Then execute: NPM run dev OK! It’s ready to run!

NPM run dev Error Module build failed: Error: Cannot find module ‘node-sass’

For a project, you may pull it from another library, change a computer, or for other reasons, you need to re install the dependency environment,

Sometimes the node sass installation fails. This phenomenon is too normal, for example:

Don’t panic when you report an error. You can usually find the answer by reading the beginning of the error report. He said that he didn’t find the module node sass

In this case, you can go to the project dependency node_ Look inside the module and find that there is no such bag. Please reload it

npm install node-sass –save

This kind of error report is coming. This node sass package should be on a foreign site. It is very easy to fail in the process of pulling. If it is broken in the middle, it will be over. So the Taobao team made an image of NPM, called cnpm. They will mirror the packages on NPM to their own site. It is relatively smooth for the domestic ones to pull the domestic ones, so you need to have the function of cnpm first, and then use cnpm to install

1.npm install -g cnpm –registry= https://registry.npm.taobao.org

2.cnpm install node-sass –save

Check the node after loading_ Modules found that the installation was successful

Run NPM run dev

Error: uncaughtexception: cannot find module ‘internal / util / types’

Solution:
It is because the version does not match. I installed appium version is 1.4.16, and node version is v7.3.0, uninstalled node, and installed v6.9.4, perfect solution~
v6.9.4 download: v6.9.4 address
The error is as follows:
error: uncaughtException: Cannot find module ‘internal/fs’ date=Thu May 17 2018 20:39:28 GMT+0800, pid=8620, uid=null, gid=null, cwd=D:\appium\node_modules\appium, execPath=C:\Program Files\nodejs\node.exe, version=v7.9.0, argv=[C:\Program Files\nodejs\node.exe, D:\appium\node_modules\appium\bin\appium.js], rss=98328576, heapTotal=77393920, heapUsed=50451736, external=666939, loadavg=[0, 0, 0], uptime=34546.8093825, trace=[column=15, file=module.js, function=Function.Module._resolveFilename, line=470, method=Module._resolveFilename, native=false, column=25, file=module.js, function=Function.Module._load, line=418, method=Module._load, native=false, column=17, file=module.js, function=Module.require, line=498, method=require, native=false, column=19, file=internal/module.js, function=require, line=20, method=null, native=false, column=20, file=evalmachine.<anonymous>, function=null, line=18, method=null, native=false, column=1, file=D:\appium\node_modules\appium\node_modules\md5calculator\node_modules\unzip\node_modules\fstream\node_modules\graceful-fs\fs.js, function=, line=11, method=null, native=false, column=32, file=module.js, function=Module._compile, line=571, method=_compile, native=false, column=10, file=module.js, function=Object.Module._extensions..js, line=580, method=Module._extensions..js, native=false, column=32, file=module.js, function=Module.load, line=488, method=load, native=false, column=12, file=module.js, function=tryModuleLoad, line=447, method=null, native=false, column=3, file=module.js, function=Function.Module._load, line=439, metho