vue Cannot find module 'net'
浏览器报错Uncaught Error: Cannot find module 'net'at webpackEmptyContext (eval at ./node_modules/defaultable sync recursive (app.js:3718), <anonymous>:2:10)at Object.workaround_require (d...
浏览器报错
Uncaught Error: Cannot find module 'net'
at webpackEmptyContext (eval at ./node_modules/defaultable sync recursive (app.js:3718), <anonymous>:2:10)
at Object.workaround_require (defaultable.js?6987:49)
at require (defaultable.js?6987:77)
at eval (server.js?663d:9)
at defaulter (defaultable.js?6987:83)
at defaultable (defaultable.js?6987:63)
at good (defaultable.js?6987:174)
at Object.eval (server.js?663d:5)
at eval (server.js:242)
at Object../node_modules/hbo-dnsd/server.js (app.js:4362)
同时,编译窗口报错
warning in ./node_modules/defaultable/defaultable.js
Critical dependency: the request of a dependency is an expression
浏览器里报的就是这个错,
1.npm install 无效
2.npm install net 无效 而且,package.json 中 net 模块赫然在目
3.删除node_modules,package-lock.json + npm install 无效
留坑待爬
自习检查出问题时改动的那个文件,发现多了一行代码
import { resolve } from 'dns';
经测试,在axios.get的then函数里面使用resolve时,就会自动出现此行代码,其实我想使用的是 promise里面的resolve.只有哪怕你删除resolve,此行代码不会消失,引入的这个东西之中引入了其他错误的模块,导致了错误。
更多推荐
所有评论(0)