Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NPM 9 breaks @grafana/e2e cli because npm bin is removed #59425

Closed
fmterrorf opened this issue Nov 28, 2022 · 5 comments · Fixed by #63446
Closed

NPM 9 breaks @grafana/e2e cli because npm bin is removed #59425

fmterrorf opened this issue Nov 28, 2022 · 5 comments · Fixed by #63446
Assignees
Labels
type/bug type/build-packaging type/e2e Everything related to end-to-end tests
Milestone

Comments

@fmterrorf
Copy link

fmterrorf commented Nov 28, 2022

What happened:
grafana-e2e run does not work and outputs

Command failed with ENOENT: /home/test/proj/Unknown command: "bin"

To see a list of supported npm commands, run:
  npm help/cypress run --env CWD=/home/test/proj/,UPDATE_SCREENSHOTS=0 --project=/home/test/proj/node_modules/@grafana/e2e
spawn /home/test/proj/Unknown command: "bin"

To see a list of supported npm commands, run:
  npm help/cypress ENOENT

What you expected to happen:
The command runs

How to reproduce it (as minimally and precisely as possible):
Create a new plugin using the plugin code gen and run npm run e2e. Make sure npm is using version 9

Anything else we need to know?:

A temporary solution would be to downgrade to NPM 8

@fmterrorf fmterrorf changed the title NPM 9 breaks @grafana/e2e cli because npm bin is removed NPM 9 breaks @grafana/e2e cli because npm bin is removed Nov 28, 2022
@zuchka
Copy link
Contributor

zuchka commented Nov 30, 2022

Thanks for creating this issue, @fmterrorf

I can reproduce this issue following the OP's steps. Use this guide to build a backend datasource plugin. with the following settings npm run e2e will fail as described:

node -v && npm -v && yarn -v
v16.14.0
9.1.2
1.22.17

@tolzhabayev
Copy link
Contributor

@zuchka I've removed plugins platform project from this issue, we still have to sort our internally which team is responsible for this package.

@fmterrorf
Copy link
Author

fmterrorf commented Dec 1, 2022

I can also attempt to put up a fix if you want. Im thinking of just using npx cypress to run the cypress bin as a fix

@zuchka
Copy link
Contributor

zuchka commented Dec 1, 2022

@fmterrorf by all means, we welcome community PRs! I'll make sure it gets reviewed right away 👍

@fmterrorf
Copy link
Author

@fmterrorf by all means, we welcome community PRs! I'll make sure it gets reviewed right away +1

I might have to skip on this. I can't figure how to setup my test environment and I don't have enough time to figure it out. Sorry

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type/bug type/build-packaging type/e2e Everything related to end-to-end tests
Projects
Development

Successfully merging a pull request may close this issue.

4 participants