create-react-app和npm install webpack错误:超出最大调用堆栈大小

时间:2018-10-08 07:40:54

标签: node.js npm webpack create-react-app

create-react-appnpm install webpack(webpack均失败。其他软件包安装成功)给出“超出最大调用堆栈大小”错误。尝试过“ npm cache clean --force”,删除了包锁定,确实在npm(npm install),npm rebuild上重新安装,将节点和npm升级到最新的稳定版本(Node:8.12.0和NPM:6.4) .1)。尽管所有这些错误仍然存​​在。

create-react-app demo-app给出以下错误

Creating a new React app in D:\Projects\demo-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

npm ERR! Maximum call stack size exceeded

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mkatti\AppData\Roaming\npm-cache\_logs\2018-10-08T07_21_50
_853Z-debug.log

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts
 has failed.

Deleting generated file... package.json
Deleting demo-app / from D:\Projects
Done.

npm install webpack --save-dev给出以下错误

npm WARN registry Using stale data from https://registry.npmjs.org/ because the
host is inaccessible -- are you offline?
npm WARN registry Using stale package data from https://registry.npmjs.org/ due
to a request error during revalidation.
npm ERR! Maximum call stack size exceeded

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mkatti\AppData\Roaming\npm-cache\_logs\2018-10-08T07_28_07
_840Z-debug.log

1 个答案:

答案 0 :(得分:-1)

我认为问题在于最新版的webpack。我遇到了类似的问题,然后我安装了4.0.0版,该版本确实有效!