Comments (23)
As a workaround, adding
@strapi/email
as an explicit dependency inpackage.json
seems to fix it.
Thanks! I tried this, but now getting the following error (image attached).
Using:
Node v20.9.0
NPM 10.1.0
from strapi.
As a workaround, adding
@strapi/email
as an explicit dependency inpackage.json
seems to fix it.Thanks! I tried this, but now getting the following error (image attached).
Using: Node v20.9.0 NPM 10.1.0
Did you try to add 5.0.0-beta.8 release of @strapi/email, it works for me
from strapi.
The issue comes from the fact that only @strapi/strapi
has @strapi/email
listed as a dependency, but @strapi/core
tries to load it dynamically without having it listed as a dependency, this will most likely break pnpm
anyway.
@alexandrebodin || @innerdvations I think it's worth reviewing how plugins are loaded by strapi/core because whilst the immediate fix would be to add @strapi/email
to the list of deps in @strapi/core
I think it's a brittle solution considering that the package wants to load deps it doesn't know about and thus relies on package manager implementation which as we can see is subject to break. Made a loom to demonstrate the issue https://www.loom.com/share/a75b25cbed004b829d3df761bcef7a1e?sid=219dcfa1-79ec-4a2b-aa9f-5807c4fe4871
from strapi.
Thanks for looking into this @Convly
However, wouldn't it make sense to add this .npmrc
file as part of the initial template?
I feel this could make life easier for devs who just want to try Strapi without needing to dig into why it's randomly failing
I'm happy to work on this if you think is a good idea.
from strapi.
On that note, while our criterion mandates us to have it as low on GitHub (for good reasons), we bumped it to medium in our internal team's backlog as we want to get it done as soon as we can
from strapi.
I manage to solve by installing manually @strapi/[email protected]
from strapi.
@rbjs can you run npm ls @strapi/email
and share the output please?
from strapi.
This is a templated message
Hello @rbjs,
Thank you for reporting this bug, however we are unable to reproduce the issue you described given the information we have on hand. Can you please create a fresh project that you are able to reproduce the issue in, provide clear steps to reproduce this issue, and either upload this fresh project to a new GitHub repo or compress it into a .zip
and upload it on this issue?
We would greatly appreciate your assistance with this, by working in a fresh project it will cut out any possible variables that might be unrelated.
Please note that issues labeled with status: can not reproduce
will be closed in 14 days if there is no activity.
Thank you!
from strapi.
Usually I don't write comments like 'same here' but I'm also seeing this and I can provide more input.
Same env as OP but:
- Using TS
- Using SQLite
Running npm ls @strapi/email
yields
[email protected] /Users/user/dev/project
└─┬ @strapi/[email protected]
└── @strapi/[email protected]
The file requiring this package is here -> https://github.com/strapi/strapi/blob/v5.0.0-beta.7/packages/core/core/src/loaders/plugins/get-enabled-plugins.ts
Let me know if you have additional questions
from strapi.
Thanks @LuisRodriguezLD, what package manager are you using? 😊
EDIT: and node version?
from strapi.
NPM 10.5.0
NODE 20.12.1
from strapi.
I have the same issue.
Node.js version: v20.13.1
NPM version: 10.5.2
Strapi version: 5.0.0-beta.7
Database: postgresql
Operating system: Debian 12
Is your project Javascript or Typescript: Typescript
from strapi.
"yarn install" instead of "npm install" fixes it for me
from strapi.
I managed to reproduce it locally.
From what I've found, it comes down to hoisting settings:
- if hoisting is enabled, no issue arise
- if you add
hoist=false
to your project.npmrc
(or disable hoisting globally), then dependency errors arise.
Note: This is something that also happen on v4 since its launch.
This is still a valid issue as package managers are slowly going toward "no hoisting by default" and we're definitely going to work on it, but we've decided to lower the priority as it's not a regression and has a straightforward workaround.
from strapi.
Hey @LuisRodriguezLD !
Thanks for your input. We've talked about your proposal internally and concluded that we would rather fix the bug directly rather than add a temporary workaround for the beta. Adding more configuration for default apps for such a niche issue feels a bit too much for us.
One thing that we can do though, is to add some troubleshooting into the documentation with a clear explanation of what's happening and how to solve it.
We'll add the development of a fix for this issue on our current backlog and try to deliver a satisfying solution asap.
What do you think?
Also, to be sure, can you confirm that adding hoist=false
in your app's config fixed the issue?
from strapi.
Understandable.
Please note I have been unsuccessfully in having it work with npm 10.5
as it currently lacks the option to set hoisting settings. There is an install strategy but I've tried all options with no success.
Hoisting config exists in pnpm and yarn but is still a RFC in npm
There is a way to trick npm but it doesn't feel right
That being said, would you guys considering updating the severity to medium
?
from strapi.
If there is a valid workaround to the issue then we leave it at low. In this case the workaround is to use that config, downgrade your npm version, or use an alternative like yarn.
That's why it remains at low for now.
from strapi.
From what I've found, it comes down to hoisting settings:
- if hoisting is enabled, no issue arise
- if you add
hoist=false
to your project.npmrc
(or disable hoisting globally), then dependency errors arise.Note: This is something that also happen on v4 since its launch.
I never encountered and still don't see this problem with v4. I only got it when trying v5 for the first time right now.
This is using the Node v20.13.1
and npm 10.8.0
for both v4 and v5, and I don't have any custom .npmrc
settings. Edit: install-strategy
defaults to hoisted
anyway.
from strapi.
As a workaround, adding @strapi/email
as an explicit dependency in package.json
seems to fix it.
from strapi.
The same error occured.
Win11
NPM 10.5.2
NODE 20.13.1
from strapi.
The same error occured.
Win11
NPM 10.8.0
NODE 20.13.1
Strapi version: 5.0.0-beta.8 release
from strapi.
As a workaround, adding
@strapi/email
as an explicit dependency inpackage.json
seems to fix it.Thanks! I tried this, but now getting the following error (image attached).
Using: Node v20.9.0 NPM 10.1.0Did you try to add 5.0.0-beta.8 release of @strapi/email, it works for me
Yes, thanks! that worked for me
from strapi.
I had same issue and adding "@strapi/email": "5.0.0-beta.8"
in packege.json
fixed it.
from strapi.
Related Issues (20)
- [BUG] Beta 9 breaks admin HOT 1
- [BUG i18n] i18n plugin render wrong current locale if redirected from relations
- Can not see all app pages on the first server load HOT 2
- Formatting highlighted text to any list type does not work in the blocks editor
- [Relation] Relation field icons are tiny HOT 1
- [Relation] Impossible to select another CT for a Relation field
- [Webhooks] Create new webhook button has color issues HOT 1
- [Webhooks] The status toggle is visually broken HOT 1
- [Webhooks] Not enough space between header rows HOT 1
- [Review Workflows] Feature is broken : stage never changes properly.
- [BUG] Configure view button is not in Content Type panel anymore
- [BUG] Translating content literals for admin does not work as before
- config/env/x structure is not working
- [CM] Date picker issue HOT 1
- Importing data from another base (content only) causes adming panel content manager to be out of sync with builder HOT 2
- Turning off Audit Logs results in error
- Strapi Registry Downtime - Impacting Package Installation and Project Development
- Admin user RBAC conditions is-creator - model missing createdBy HOT 1
- [strapi v5 Beta] Custom admin URL causes blank panel in the production environment.
- RBAC Custom condition not working in Strapi 4.15.5 up to 4.25.5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strapi.