-
Notifications
You must be signed in to change notification settings - Fork 150
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
Admin build fails with NPM 8.4.0 (older Shopware 6 version) and now with NPM 8.6.0 #136
Comments
Hmm we should do |
You could install https://github.com/FriendsOfShopware/shopware-cli and use |
I have created an internal issue and pushed it https://issues.shopware.com/issues/NEXT-19945? |
For now I have pinned the version to 8.3 in the CI. though I think using npm install --no-save might make more sense. |
We had the same issue. npm released version 8.4.1 8 hours ago (https://www.npmjs.com/package/npm?activeTab=versions). We solved this by using npm version 8.4.0 instead of latest. The "issue" was created because npm fixed a bug. They didn't validate the lockfiles: |
Hmm... Interesting, personally I think that this is a breaking change in NPM and should have been a NPM v9.x release but that aside it seems to be easily fixable by calling |
So what is the fix for this issue? It's still present in v6.4.8.0... |
@shyim I could be wrong but I think the shopware/platform pipelines are not also failing due to this: I get e.g. now for the PHPUnit pipelines: https://github.com/shopware/platform/runs/5463997380?check_suite_focus=true |
Is your fork maybe out of date? |
@shyim shouldn't be I just fetched origin/trunk today. but the same issue is on the trunk branch on a commit from a few hours ago, see: I think it happens since sometime yesterday after checking the commit history. |
I've stubmled upon this with some team members today.
Edit#1 Downgrading npm to 8.3.2 was fixing it.
|
8.4 and 8.5 seems to work now with 6.4.10.0. However, there seems to be a new issue with 8.6.0:
|
Regarding 8.6.0 it is most likely related to this: npm/cli#4664 as mentioned in the ticket it was probably closed pre-maturely and is actually an issue with 8.6.0 but not 100% sure, will depend on feedback on that issue. |
In any case it would probably make sense to add some CI tests that automatically tries to build storefront/admin with new released NPM / node version to ensure it still works or not and if not, it should be fixed. Or even better to ensure potential issues cannot occur in the first place lilke e.g. an out-of-date lock file (8.4.0 issue) and now I would guess a dependency was updated but not its own dependencies which results in the issue above? Though I doubt all these issues can be avoided. Personally I think NPM is more at fault here for changing such behaviors in minor versions. |
Any news regarding NPM 8.6 and newer? |
I have the same error on build with image shopware/development:7.4-composer-2 where is new npm version (8.15.0) According to npm/cli#5113 you can change in build-administration.sh or skip checking if exists package-lock.json and use 'npm install --prefix'. First solution with |
In newer Shopware versions, it is fixed as we have updated that files |
We still have this issue, the quickfix npm clean-install --legacy-peer-deps --prefix "$path" works but is a little annoying due to the merges from the upstream, but fine. We are still locked on 16.10.0 in our prod builds, are there any benefits in the newer version other then less depcreation warnings? Node: v18.12.1
|
PHP Version
8.4
Shopware Version
6.4.7.0
Expected behaviour
Admin build to succeed.
Actual behaviour
npm clean-install fails. Not sure if the lock file should be updated or the admin task should instead just use
npm install
instead ofnpm clean-install
becausenpm install
works. Probably best to usenpm install
instead and also do so in build-storefront.shHow to reproduce
Install node ^16, npm ^8.4 and install Shopware 6.4.7.0 in the production template and execute
./bin/build-administration.sh
. It will fail with:The text was updated successfully, but these errors were encountered: