从@ babel / polyfill获取有关未找到某些依赖项的错误消息。
为什么没有与@ babel / polyfill一起安装这些依赖关系
These dependencies were not found:
* core-js/fn/array/flat-map in ./node_modules/@babel/polyfill/lib/noConflict.js
* core-js/fn/promise/finally in ./node_modules/@babel/polyfill/lib/noConflict.js
* core-js/fn/string/pad-end in ./node_modules/@babel/polyfill/lib/noConflict.js
* core-js/fn/string/pad-start in ./node_modules/@babel/polyfill/lib/noConflict.js
* core-js/fn/string/trim-end in ./node_modules/@babel/polyfill/lib/noConflict.js
* core-js/fn/string/trim-start in ./node_modules/@babel/polyfill/lib/noConflict.js
* core-js/fn/symbol/async-iterator in ./node_modules/@babel/polyfill/lib/noConflict.js
* core-js/library/fn/array/is-array in ./node_modules/@babel/runtime-corejs2/core-js/array/is-array.js
* core-js/library/fn/global in ./node_modules/@babel/polyfill/lib/index.js
* core-js/library/fn/parse-float in ./node_modules/@babel/runtime-corejs2/core-js/parse-float.js
* core-js/library/fn/parse-int in ./node_modules/@babel/runtime-corejs2/core-js/parse-int.js
To install them, you can run: npm install --save core-js/fn/array/flat-map core-js/fn/promise/finally core-js/fn/string/pad-end core-js/fn/string/pad-start core-js/fn/string/trim-end core-js/fn/string/trim-start core-js/fn/symbol/async-iterator core-js/library/fn/array/is-array core-js/library/fn/global core-js/library/fn/parse-float core-js/library/fn/parse-int
ℹ 「hot」: webpack: Compiling Done
答案 0 :(得分:0)
对我来说,问题是在nodeJs环境中偶然需要lib(core-js
)(因为vscode自动导入新功能)。
我正在处理的项目包含2个文件夹:
/lib
=>供前端使用的已编译/精简版(必须具有core-js
)/src
=>未被编译供后端nodeJ使用(应该不需要core-js
)我希望这会引导您走上正确的道路:)