Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Webpack 与网页包捆绑时未找到模块2_Webpack_Yarn V2 - Fatal编程技术网

Webpack 与网页包捆绑时未找到模块2

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

我正在尝试使用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-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