-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Cannot create build: TypeError: Ajv is not a constructor #12155
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
Comments
Same here... |
Same problem. |
Same issue here. Sometimes it works and sometimes it doesn't. Also happens on |
Same Resolved by deleting the |
Same here, any update for this issue? |
I got this fixed after uninstalling
|
I am having a similar problem. I believe that this error occurs when particular libraries are imported in a create-react-app project. I did some debugging and found that in some cases, if the library's code (in It seems that I found a very hacky workaround: replace instances of This is a pretty bad solution because it involves manually changing code in I tried this workaround because I found that the only place that By ejecting and writing a custom webpack loader I determined that this is occurring because the libraries being loaded ("three" in my case) provides a |
I have tried the fix vezwork/create-react-app@main...vezwork:create-react-app:fix-cjs-loading for my similar issue as well. Will this fix be merged soon. Thanks. |
I followed through with the earlier comment and the npm install worked fine as well. Still don't know what I was doing. But its cause I was moving folders around and really I was down the wrong rabbit hole. Turns out I just needed to install a few packages my team member did |
This is the only solution that's working for me now. It would be better if someone can point to a nicer solution. As currently whenever I add a new package, I have to repeat the above steps. |
Same issue. |
+1 same issue |
This is very painful, every time you add a new dependency you have to Any updates on this are very much appreciated 🙏 |
Until this gets fixed we can use a shell alias:
|
Not entirely sure if this helps, because I don't have Also, despite not having the preinstall hooks, I did still get this error until I upgraded the module. You might also have to remove package-lock.json and start fresh (as well as removing |
Steps To Reproduce
npm run build
.The current behavior
The text was updated successfully, but these errors were encountered: