-
Notifications
You must be signed in to change notification settings - Fork 22
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
TypeScript dependency conflict with npm 7 / node 14 #2
Comments
Hi @chludwig-haufe, I am sorry to hear you are having challenges building. This project includes other libraries and it is upgraded in terms of React, TS and other libraries, so having CRA vanilla or CRA TS version doesn't necessarily means that there is a problem with this CRA template. As you can see from the action tab: action (you can see in the action tab and see the build, test etc passing icons). The project is building without a hick, it's building on a Ubuntu machine using the same npx command you are using. I went ahead and upgraded the actions to start building and testing the Github actions using Node v14 (instead of v12) that's using the npx and it's building correctly - you can still see on the action tab and the project icons passing icons. Additionally, I tried to build locally on a Mac 10.15.7 with Node v12.19.0, v14.13.1 and even v15.14.0, using both yarn and npx commands and couldn't reproduce your error. All these things are leading me to believe that this is most likely to do with your personal machine's configuration. Maybe you have some libraries installed globally that are overtaking some of the local project libraries used and causing this. Looking quickly at your file I see few things a bit off in your error file.
Solutions:
If you get any progress in term of pointing out that there is a specific error related to this project, please feel free to open this ticket or new one. Best, Eli |
Hi @EliEladElrom , well, the most obvious difference I see between your build on GitHub using Node v14 and my build is the npm version: In your case it's still npm 6.14.11, I have 7.9.0. The build breaks due to a peer dependency and the change to peer dependency resolution was announced as an “exciting new feature” of npm 7... Indeed, if I run react-scripts 4.0.3 declares a peer dependency on typescript This issue is not blocking me. But if your template is not compatible with npm 7 (whatever the reason), then I think it's worth a note in the README. Cheers, |
Searching the npm issues, this might actually be a manifestation of npm/cli#2999. (It was yesterday marked as a prio 1 bug.) |
@chludwig-haufe thanks for the research. I haven't tried with npm v7.9. Personally, I prefer yarn. Sounds like they are on it and hopefully will get resolved soon. Maybe move to yarn ;) |
If I run
npx create-react-app my-app --template must-have-libraries
with npm 7.9.0 / node 14.16.0 (also tested with npm 7.6.0), I get the following dependency resolution error:The full eresolve-report.txt is attached.
Using npm 6.14.12 / node 12.22.1, creation of the app succeeds.
First I suspected this to be a regression of facebook/create-react-app#9964, but
npx create-react-app my-app --template typescript
succeeds using npm 7 / node 14 as well. It therefore is specific to cra-template-must-have-libraries.The text was updated successfully, but these errors were encountered: