My colleague detection project, when roadhog build compile problems:
Module not found: Error: Can't resolve '@babel/runtime/helpers/esm/extends' in '/Users/everlose/workspace/scnode/msgcenter-sms/node_modules/history/esm'
According to the following ls command, we can see the history directory does not exist with the project with the path, '/ Users / everlose / workspace / scnode / msgcenter-sms / node_modules / history / esm'.
$ npm ls history
[email protected] /Users/everlose/workspace/scnode/msgcenter-sms
├─┬ [email protected]
│ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ └── [email protected]
Find history module code on github, turn to the 4.9.0 version babel found that it depends really becomes a 7, while the main babel project or version 6. Speculate on the possible impact of babel major version.
View or use babel 6 of its 4.7.2 and earlier. The solution is therefore
$ npm install [email protected] --save
$ rm -rf node_modules
$ npm install
$ npm ls history
[email protected] /Users/everlose/workspace/scnode/msgcenter-sms
├─┬ [email protected]
│ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ │ └─┬ [email protected]
│ │ └── [email protected] deduped
│ └─┬ [email protected]
│ └── [email protected] deduped
└── [email protected]
Recompile normal
$ npm run build
> [email protected] build /Users/everlose/workspace/scnode/msgcenter-sms
> roadhog build
Build completed in 33.632s
Compiled successfully.
File sizes after gzip:
681.58 KB public/index.657ff4cf.js
37.33 KB public/index.424c8126.css
Experience
Like this big update, version-dependent change of the whole, that history should not just rely on package upgrade version of the middle. These dependencies and almost unlimited nesting dolls, I do not know when to use, really are deceptive.