-
Notifications
You must be signed in to change notification settings - Fork 44
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
does not work with npm@7 #312
Comments
@willemneal this might be nice and fast for you. If not, I could spend a couple hours trying to figure it out sometime in the next two week or so. |
fixes #533 npm@7 ships with node@15 and changes behavior to automatically install peerDependencies. It seems that the peerDependencies for near-sdk-as aren't configured perfectly, and this causes problems. Once we figure out this upstream problem, we may also need to add more explicit dependencies at the root of the project, since npm@7 may not install dependencies-of-dependencies to the root node_modules folder, either. This will be addressed in near/near-sdk-as#312 https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major
fixes #533 npm@7 ships with node@15 and changes behavior to automatically install peerDependencies. It seems that the peerDependencies for near-sdk-as aren't configured perfectly, and this causes problems. Once we figure out this upstream problem, we may also need to add more explicit dependencies at the root of the project, since npm@7 may not install dependencies-of-dependencies to the root node_modules folder, either. This will be addressed in near/near-sdk-as#312 https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major
@chadoh Not sure how I missed this. I guess I need to cultivate my GH notifications. @amgando noticed this a while back and the solution was to just roll it back. Perhaps the quick solution is to add to the node requirements in the package.json so that it fails to install if 15 is used. Not the best long term solution. I think the issue here is that the tooling, e.i. I also think another reason to switch to GH Actions is that we could make one action that tests all versions of node. Then all the other projects depend on it. Then when we want to update the action to include a new version of node it updates the rest. |
Looks like |
NodeJS 15 ships with [NPM 7](https://blog.npmjs.org/post/617484925547986944/npm-v7-series-introduction). Perhaps the biggest change in NPM 7 is that it automatically installs peerDependencies. If peerDependencies are well-specified this causes no issues, but it seems that the peerDependencies within the near-sdk-as packages are not quite correct.
As shown in the screenshot above:
1. install nodejs 15, which comes with npm 7
2. check out the latest
master
branch ofnear-sdk-as
3. remove
yarn.lock
andnode_modules
4. run
npm install
This is the fastest way to reproduce this issue, but note that the issue also arises for projects that depend on near-sdk-as. See the same error as shown in the screenshot above in the output from a fresh project created with create-near-app here: near/create-near-app#533
I've worked around the problem in create-near-app by adding
npm install --legacy-peer-deps
to the command: near/create-near-app@38020abOnce we address the bug here in near-sdk-as, we can get rid of this flag.
The text was updated successfully, but these errors were encountered: