Webpack 与网页包捆绑时未找到模块2
我正在尝试使用Thread 2使用webpack构建应用程序,在使用webpack 4和Webpack 与网页包捆绑时未找到模块2,webpack,yarn-v2,Webpack,Yarn V2,我正在尝试使用Thread 2使用webpack构建应用程序,在使用webpack 4和pnp webpack插件和webpack 5构建应用程序时出现此错误: (node:415) UnhandledPromiseRejectionWarning: Error: Error on webpack build: ../lib/core/lib/nudash.js Module not found: Error: Something that got detected as your top-le
pnp webpack插件
和webpack 5构建应用程序时出现此错误:
(node:415) UnhandledPromiseRejectionWarning: Error: Error on webpack build: ../lib/core/lib/nudash.js
Module not found: Error: Something that got detected as your top-level application (because it doesn't seem to belong to any package) tried to access a package that is not declared in your dependencies
Required package: core-js (via "core-js/modules/web.dom-collections.iterator")
Required by: /usr/src/app/lib/core/lib/nudash.js
我看不出是什么导致了这个问题,它适用于Thread 1,那么我能做些什么来解决这个问题呢?您似乎需要安装包core js 在项目根文件夹的终端中(与运行webpack生成的位置相同)运行
我目前安装了3个版本的
core js
:3.6.4
,2.6.11
和1.2.7
yarn add core-js