问题描述
我有带节点的Linux-12.4.0,npm-6.9.0,npx-6.9.0.
I have Linux with node - 12.4.0, npm - 6.9.0, npx - 6.9.0.
我运行了命令 npx create-react-app cra
并得到以下结果:
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
npm ERR! Maximum call stack size exceeded
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
日志显示错误从此处开始:
27623 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/chokidar/node_modules/fsevents):
27624 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
27625 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
27625 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
27625 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
27625 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
27626 verbose stack RangeError: Maximum call stack size exceeded
27626 verbose stack at RegExp.test (<anonymous>)
27626 verbose stack at isDepOptional (/home/piyush/.nvm/versions/node/v9.11.1/lib/node_modules/npm/lib/install/deps.js:423:45)
为什么只在OSX上尝试在Linux上安装 fsevents ?
Why is it trying to install fsevents on Linux, while it is only for OSX only ?
推荐答案
在切换到根驱动器方面有相同的问题.但是,还有另一种解决方案.我的其他"问题驱动器是它具有exFAT文件系统.将驱动器重新格式化为ext4-问题已解决.重新格式化为ntfs-也可以正常工作.但是回到exFAT-得到了堆栈大小"即使我为exFAT安装了驱动程序,该错误再次出现,并且通常可以通过读取和写入进行访问.节点版本14.15.4
Had the same issue where switching to the root drive helped. But there is also another solution. The problem with my "other" drive was that it had the exFAT file system. Reformatted the drive as ext4 - problem solved. Reformatted as ntfs - also works fine. But went back to exFAT - got the "stack size" error again even though I had drivers installed for exFAT and it was normally accessible for read and write. Node version 14.15.4
这篇关于在Linux上安装create react app时超出了最大调用堆栈大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!