当运行npm运行build:ssr时,出现以下错误:./dist/server/polyfills-es5.js中的ERROR找不到:

时间:2019-06-20 11:31:25

标签: node.js angular angular-universal

我在项目中添加了Angular SSR。但是当我想用以下命令构建它时:npm运行build:ssr

但是我最终遇到了很多错误,例如:

ERROR in ./dist/server/polyfills-es5.js
Module not found: Error: Can't resolve 'core-js/modules/es.weak-map' in '/Users/tooflex/Documents/hiphopstories/hip-hop-stories blog/dist/server'
 @ ./dist/server/polyfills-es5.js 1155:17-55
 @ ./dist/server sync ^\.\/.*\.js$
 @ ./dist/server/main.js
 @ ./server.ts

ERROR in ./dist/server/polyfills-es5.js
Module not found: Error: Can't resolve 'core-js/modules/web.dom-collections.iterator' in '/Users/tooflex/Documents/hiphopstories/hip-hop-stories blog/dist/server'
 @ ./dist/server/polyfills-es5.js 1166:17-72
 @ ./dist/server sync ^\.\/.*\.js$
 @ ./dist/server/main.js
 @ ./server.ts
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! hip-hop-stories@0.0.0 compile:server: `webpack --config webpack.server.config.js --progress --colors`
npm ERR! Exit status 2

0 个答案:

没有答案