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

[Bug]: Following documentation for cloud deployment via CLI results in error #2365

Open
troyha opened this issue Jan 21, 2025 · 2 comments
Open

Comments

@troyha
Copy link

troyha commented Jan 21, 2025

Link to the documentation page or resource

https://docs.strapi.io/cloud/getting-started/deployment-cli

Describe the bug

I folowed the instructions for Cloud CLI deployment, including the link to local installation via CLI.

Everything works as expected when installing and running strapi locally but when I try to use "npx run strapi login" and "npx run strapi deploy" i get a MODULE_NOT_FOUND error for strapi.

Additional context

Is this because I'm using v22 of node.js? The installation docs say only v18 and v20 but I assumed v22 would work as well as it is an LTS version and the docs are just outdated.

I can see "@strapi/strapi": "5.8.0", in dependencies and have tried running npm install again and get the warnings:

npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '@strapi/[email protected]',
npm warn EBADENGINE required: { node: '>=18.0.0 <=20.x.x', npm: '>=6.0.0' },
npm warn EBADENGINE current: { node: 'v22.12.0', npm: '10.9.0' }
npm warn EBADENGINE }

but the package.json shows:
"engines": {
"node": ">=18.0.0 <=22.x.x",
"npm": ">=6.0.0"
},

Suggested improvements or fixes

I've only got a basic understanding of this stuff so need some guidance. I feel like this should just work when following the documentation.

Related issue(s)/PR(s)

No response

@troyha
Copy link
Author

troyha commented Jan 21, 2025

I've just modified the commands to npm instead of npx and they work i.e. "npm run strapi login" and "npm run strapi deploy" work correctly.

@pwizla
Copy link
Collaborator

pwizla commented Jan 21, 2025

Hi! I'll double-check with engineers, but I'd say it's probably safer to stick to node 20 for now. Even if Strapi itself should support node 22, maybe some internal dependencies, such as pack-up as mentioned in the error message, might not be fully compatible with node 20. The difference you get between the npm and npx behaviors is because npm will use the locally installed packages while npx will install/use the distant packages, and some versions may be incompatible.

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