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

[Bundling failed]: node_modules/@expo-google-fonts/dev/index.js: Maximum call stack size exceeded #50

Open
SrBrahma opened this issue Oct 28, 2021 · 8 comments

Comments

@SrBrahma
Copy link

I just found out expo-google-fonts/dev and added to my code import { Inter_600SemiBold } from '@expo-google-fonts/dev'. Now, when building my expo app on launch, the following error is raised:

Android Bundling failed 10115ms
node_modules/@expo-google-fonts/dev/index.js: /home/hb/Dev/MyAppName/app/node_modules/@expo-google-fonts/dev/index.js: Maximum call stack size exceeded
RangeError: /home/hb/Dev/MyAppName/app/node_modules/@expo-google-fonts/dev/index.js: Maximum call stack size exceeded
    at PluginPass.ReferencedIdentifier (/home/hb/Dev/MyAppName/app/node_modules/@babel/helper-define-polyfill-provider/lib/visitors/usage.js:20:25)
    at PluginPass.newFn (/home/hb/Dev/MyAppName/app/node_modules/@babel/traverse/lib/visitors.js:218:17)
    at newFn (/home/hb/Dev/MyAppName/app/node_modules/@babel/traverse/lib/visitors.js:177:21)
    at NodePath._call (/home/hb/Dev/MyAppName/app/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/home/hb/Dev/MyAppName/app/node_modules/@babel/traverse/lib/path/context.js:40:17)
    at NodePath.visit (/home/hb/Dev/MyAppName/app/node_modules/@babel/traverse/lib/path/context.js:90:31)
    at TraversalContext.visitQueue (/home/hb/Dev/MyAppName/app/node_modules/@babel/traverse/lib/context.js:103:16)
    at TraversalContext.visitSingle (/home/hb/Dev/MyAppName/app/node_modules/@babel/traverse/lib/context.js:77:19)
    at TraversalContext.visit (/home/hb/Dev/MyAppName/app/node_modules/@babel/traverse/lib/context.js:131:19)
@dli0793
Copy link

dli0793 commented Oct 30, 2021

did u figure it out? same problem

@SrBrahma
Copy link
Author

SrBrahma commented Oct 30, 2021

No :/ I had to install all the fonts I wanted to try out, then removed the ones I didn't like :P

@dli0793
Copy link

dli0793 commented Oct 30, 2021

how do you do that? and does that fix the problem?

@SrBrahma
Copy link
Author

Let's say I wanted to try the 'inter' font. So, as readme says, expo install @expo-google-fonts/inter and try it out. It fixes the problem as I am no longer using the @expo-google-fonts/dev, but the individual and local fonts, not downloading them on the go.

@dli0793
Copy link

dli0793 commented Oct 30, 2021

i see what u mean. i figured out how to fix it by going in the index.js file and deleting the fonts I did not want

@SrBrahma
Copy link
Author

That's a simple and a clever solution! I also thought previously that the 6k file with its exports was causing the problem, but hadn't the idea of cleaning it. I am curious on how the author are going to fix it (and to know what is causing the error). Maybe using js Proxy somehow? JSON? Regex?

@ccheever
Copy link
Contributor

ccheever commented Nov 5, 2021

I'm not sure what the problem is here. I'll try to investigate soon. If anyone figures out what's going on here and how to fix it in the meantime, contributions are welcome.

@imaron85
Copy link

imaron85 commented Nov 7, 2021

Had this problem for weeks, thanks for the fix. Importing directly not using /dev worked. ^^

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

4 participants