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

NPM missing peer-dependencies #28150

Open
2 of 3 tasks
lscheibel opened this issue Apr 19, 2024 · 2 comments
Open
2 of 3 tasks

NPM missing peer-dependencies #28150

lscheibel opened this issue Apr 19, 2024 · 2 comments

Comments

@lscheibel
Copy link
Contributor

Bug description

Follow-up on this issue : #21799

I see two problems, the first one being the use of an unsupported Node version 16, while the package.json specifies that the Node version must be ^18.19.1, which is also the version used in the docker-compose.yml. This is despite the fact that the current package-lock.json seems to have been generated with Node 16.

As suggested by others, another problem are the missing peer-dependencies, namely currencyformat.js but also global-box. Interestingly enough, when installing all dependencies for superset-frontend with Node 18 and then trying to start the dev-server I get an error about another missing peer-dependency @react-spring/web.

As a solution I could submit a PR that installs the following packages:

How to reproduce the bug

  1. Install and use Node 18.
  2. Navigate to superset-frontend.
  3. Delete node_modules e.g. rm -rf node_modules.
  4. Run npm i.
  5. Run npm run dev-server.

Errors like "Can't resolve '@react-spring/web'" appear.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

Not applicable

Node version

Not applicable

Browser

Not applicable

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@rusackas
Copy link
Member

We'd welcome a PR, or three! However, note that the updates should be made in the relevant plugins' directories, not on Superset's main package.json.

I thought we had everything all set with the node18 upgrade, but perhaps the package-lock file also needs an update thanks to the newer npm version, too.

@lscheibel
Copy link
Contributor Author

After a bit more investigation, it seems that I had legacy-peer-deps enabled globally in the Node 18 version of my work laptop. Without this, the peer dependencies are correctly installed and also the lock-file doesn't have any changes anymore. I would guess that this is also the cause for the problem that the original author of the issue had, since peer-deps are installed since npm >=7.

Sorry for the confusion, I'm pretty sure that both, this issue and #21799 can be closed.

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