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

npx expo lint gives a maximum call stack size exceeded #28799

Closed
oamr-abdelaziz opened this issue May 13, 2024 · 2 comments · Fixed by #28801
Closed

npx expo lint gives a maximum call stack size exceeded #28799

oamr-abdelaziz opened this issue May 13, 2024 · 2 comments · Fixed by #28801
Assignees
Labels
CLI Versioned Expo CLI -- `npx expo start` Issue accepted

Comments

@oamr-abdelaziz
Copy link

Summary

I created a new expo project, and I'm trying to setup eslint as in documentation by trying
npx expo lint
but I receive RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
at findFileInParents (D:\Multimedia\GenerateAIImage\node_modules@expo\cli\build\src\utils\findUp.js:54:5)
at findFileInParents (D:\Multimedia\GenerateAIImage\node_modules@expo\cli\build\src\utils\findUp.js:60:12)
at findFileInParents (D:\Multimedia\GenerateAIImage\node_modules@expo\cli\build\src\utils\findUp.js:60:12)
at findFileInParents (D:\Multimedia\GenerateAIImage\node_modules@expo\cli\build\src\utils\findUp.js:60:12)
at findFileInParents (D:\Multimedia\GenerateAIImage\node_modules@expo\cli\build\src\utils\findUp.js:60:12)
at findFileInParents (D:\Multimedia\GenerateAIImage\node_modules@expo\cli\build\src\utils\findUp.js:60:12)
at findFileInParents (D:\Multimedia\GenerateAIImage\node_modules@expo\cli\build\src\utils\findUp.js:60:12)
at findFileInParents (D:\Multimedia\GenerateAIImage\node_modules@expo\cli\build\src\utils\findUp.js:60:12)
at findFileInParents (D:\Multimedia\GenerateAIImage\node_modules@expo\cli\build\src\utils\findUp.js:60:12)
at findFileInParents (D:\Multimedia\GenerateAIImage\node_modules@expo\cli\build\src\utils\findUp.js:60:12)

What platform(s) does this occur on?

No response

SDK Version

51.0.2

Environment

expo-env-info 1.2.0 environment info:
System:
OS: Windows 11 10.0.22631
Binaries:
Node: 20.0.0 - C:\Program Files\nodejs\node.EXE
npm: 9.6.4 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: AI-233.14808.21.2331.11709847
npmPackages:
expo: ~51.0.2 => 51.0.2
expo-router: ~3.5.11 => 3.5.11
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.74.1 => 0.74.1
react-native-web: ~0.19.10 => 0.19.11
Expo Workflow: managed

Minimal reproducible example

https://github.com/oamr-abdelaziz/Generate-AI-Image

type in terminal, npx expo lint

@oamr-abdelaziz oamr-abdelaziz added CLI Versioned Expo CLI -- `npx expo start` needs validation Issue needs to be validated labels May 13, 2024
@expo-bot expo-bot removed the needs validation Issue needs to be validated label May 13, 2024
@byCedric byCedric self-assigned this May 13, 2024
@expo-bot
Copy link
Collaborator

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

byCedric added a commit that referenced this issue May 14, 2024
)

# Why

Fixes #28799

# How

Determining if the current `cwd` is the root of a drive was hardcoded,
and not correct for Windows. On windows, the root is something like
`C:\` or `D:\`, which also cannot be hardcoded.

Instead, it now relies on `path.dirname(cwd)`, if that equals the
current `cwd` it stops. It basically means that we can't go one up
anymore.

# Test Plan

- See #28799

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
@oamr-abdelaziz
Copy link
Author

oamr-abdelaziz commented May 14, 2024

I updated my expo to the latest now but the issue is still the same,
Is there something else I should do? @byCedric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Versioned Expo CLI -- `npx expo start` Issue accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants