Some fell into the pit do not know how to go, you may never have to get up again! ! !
First, the error description
Good yesterday, this morning to get a look at the code from the git others submitted on the wrong! And colleagues also acquired code, run a little error did not! ! !
cya @ KQ-101 MINGW64 / e / Source / Repos / ProjectManagement / WebUI (master) // vscode line is displayed automatically.
$ Npm run dev // ($ is displayed automatically, dev is my take alias)
1) Browser error
Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
at Module.<anonymous> (BaseClient.js:23)
at Module../node_modules/webpack-dev-server/client/clients/BaseClient.js (BaseClient.js:38)
at __webpack_require__ (bootstrap:767)
at fn (bootstrap:130)
at Module.<anonymous> (SockJSClient.js:73)
at Module../node_modules/webpack-dev-server/client/clients/SockJSClient.js (SockJSClient.js:121)
at __webpack_require__ (bootstrap:767)
at fn (bootstrap:130)
at Object../node_modules/webpack-dev-server/client/socket.js (socket.js:52)
at __webpack_require__ (bootstrap:767)
2) vscode given terminal:
eslint error, such as:
Errors:
13 http://eslint.org/docs/rules/no-redeclare
5 http://eslint.org/docs/rules/no-unused-vars
1 http://eslint.org/docs/rules/no-empty
1 http://eslint.org/docs/rules/no-undef
Module Warning (from ./node_modules/eslint-loader/index.js):
✘ http://eslint.org/docs/rules/no-unused-vars 'width' is assigned a value but never used
src\views\dataResource\dataCatalog\index.vue:314:13
const width = catalogListContainer.offsetWidth
Probably: Please check Ctrl + left, to see a variety of documents ** eslint already defined or referenced, but have never been used.
In fact, the fundamental problem is not eslint.
3)
Second, the solution : uppercase to lowercase webui WebUI
Then, just fine! ! !
Equivalent: cya @ KQ-101 MINGW64 / e / Source / Repos / ProjectManagement / webui (master)
Fourth, the invalid attempt:
1) According to Baidu browser error was:
https://www.cnblogs.com/qingqingzou-143/p/7028683.html?utm_source=itdadao&utm_medium=referral
The article said: In webpack package, they can mix and require export in js file. But not mix import and module.exports.
But this is clearly not in line with my actual, because my colleagues and the code is identical.
2) delete the native code, re-re gitee (cloud code) Get the code. Finally, the same code with colleagues;
3) node.js unloading, reloading; and finally a version with colleagues;
4) npm file found two places, one is the node that comes in will be removed when the node unloading; another directly delete the files in the system disk in npm. Finally, a version with colleagues;
5) eslint separate package unloading, reloading.
6) Delete node_modules file, and then execute npm install, reinstall all of the package files.
7) each suspect package npm install different versions of files inside, Baidu found package-lock.json, find the profile to ensure the consistency of the package version.
https://www.cnblogs.com/cangqinglang/p/8336754.html
https://www.cnblogs.com/kugeliu/p/9153775.html
8) continued guess the reason: webpack problem.
Contrast browser error code and found different content compiled!
wrong:
One more (webpack) -dev-server file!
the correct one is:
Third, the summary:
Solution: totally blind attempt.
Root Cause: not found.
Direct cause: good yesterday, this morning to get a look at the code from the git others submitted on the wrong! And colleagues also acquired the code, but that is not wrong! ! !