Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

未运行npm install的情况下build报错 RangeError: Maximum call stack size exceeded #1874

Closed
marskid opened this issue Jan 9, 2019 · 3 comments
Assignees

Comments

@marskid
Copy link

marskid commented Jan 9, 2019

问题描述
没有安装node_modules直接build导致报错

RangeError: Maximum call stack size exceeded
    at Object.normalize (path.js:284:32)
    at Object.join (path.js:488:18)
    at Object.exports.recursiveFindNodeModules (C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\@tarojs\cli\src\util\index.js:541:28)
    at Object.exports.recursiveFindNodeModules (C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\@tarojs\cli\src\util\index.js:545:18)
    at Object.exports.recursiveFindNodeModules (C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\@tarojs\cli\src\util\index.js:545:18)

复现步骤

taro convert
cd .\taroConvert\
yarn run build:weapp

导致出错

期望行为
期望提示信息更明确,提醒用户执行npm install

报错信息

yarn run build:weapp
yarn run v1.12.3
$ taro build --type weapp
👽 Taro v1.2.4

开始编译项目 taroConvert
path.js:284
  normalize: function normalize(path) {
                               ^

RangeError: Maximum call stack size exceeded
    at Object.normalize (path.js:284:32)
    at Object.join (path.js:488:18)
    at Object.exports.recursiveFindNodeModules (C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\@tarojs\cli\src\util\index.js:541:28)
    at Object.exports.recursiveFindNodeModules (C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\@tarojs\cli\src\util\index.js:545:18)
    at Object.exports.recursiveFindNodeModules (C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\@tarojs\cli\src\util\index.js:545:18)
    at Object.exports.recursiveFindNodeModules (C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\@tarojs\cli\src\util\index.js:545:18)
    at Object.exports.recursiveFindNodeModules (C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\@tarojs\cli\src\util\index.js:545:18)
    at Object.exports.recursiveFindNodeModules (C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\@tarojs\cli\src\util\index.js:545:18)
    at Object.exports.recursiveFindNodeModules (C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\@tarojs\cli\src\util\index.js:545:18)
    at Object.exports.recursiveFindNodeModules (C:\Users\Administrator\AppData\Local\Yarn\Data\global\node_modules\@tarojs\cli\src\util\index.js:545:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

系统信息
👽 Taro v1.2.4

Taro CLI 1.2.4 environment info:
System:
OS: Windows 10
Binaries:
Node: 10.14.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.12.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

补充信息
查找判断node_modules目录的代码有问题,没有判断目录不存在的情况

@taro-bot
Copy link

taro-bot bot commented Jan 9, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@crystal1990
Copy link

我也遇到了这样的问题,提示不明确,都不知道问题在哪里

@1Crazy
Copy link

1Crazy commented May 24, 2019

我也遇到了,突然发现,没有node_modules,哈哈哈哈哈哈,低级错误。。。。。。。。。。

@Chen-jj Chen-jj closed this as completed Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants