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

what's the logic on project admin-build using yarn instead of npm? #297

Closed
0x4 opened this issue Jan 22, 2024 · 2 comments
Closed

what's the logic on project admin-build using yarn instead of npm? #297

0x4 opened this issue Jan 22, 2024 · 2 comments

Comments

@0x4
Copy link

0x4 commented Jan 22, 2024

Question

I had trouble running shopware-cli project admin-build because one of the store-plugins installed with composer contained a yarn.lock file.
looks like admin-build uses yarn inside the plugin directory if a yarn.lock file is found?
is there a way to force npm? or at least fall back to npm if yarn fails? afaik yarn is not a requirement for shopware

in my case: using bin/build-administration.sh works
issue1: if yarn is not installed admin-build failes
issue2: that yarn.lock was malformed - so even if installing yarn the build failes - and because the yarn.lock file is from an external dependency the fix delting the yarn.lock file is not the best option

@shyim
Copy link
Member

shyim commented Jan 22, 2024

Is yarn not installed or does it really yarn fail?

The problem with running npm is that the yarn.lock does nothing and maybe newer packages will be installed

@0x4
Copy link
Author

0x4 commented Jan 22, 2024

yarn was not installed - in this case admin-build stopped with an error that yarn is missing

after installing it I had an issue with the yarn file in that plugin

error SyntaxError: Invalid value type 1283:0 in ...src/Resources/app/administration/yarn.lock

looks like an error in the plugin - or version mismatch with yarn (i'm not really a node expert)

btw. that plugin has a package-lock.json and a yarn.lock included

main question: the "normal" way using bin/build-administration.sh only uses npm afaik - so for consistency it should be better using the same logic in shopware-cli? if the plugin manufacturer is using yarn only that wouldn't work in the default way?

@shyim shyim closed this as completed in 4a92b69 Apr 17, 2024
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

2 participants