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

chore: fix local dev missing dep #5167

Closed
wants to merge 1 commit into from
Closed

Conversation

posva
Copy link
Contributor

@posva posva commented Feb 9, 2024

Description

I noticed the package wasn't installed to run the project. If that's intentional, ignore the PR or feel free to just add manually and close this

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

Copy link

netlify bot commented Feb 9, 2024

Deploy Preview for fastidious-cascaron-4ded94 ready!

Name Link
🔨 Latest commit 5130510
🔍 Latest deploy log https://app.netlify.com/sites/fastidious-cascaron-4ded94/deploys/65c6404ab5cfec0008698e6e
😎 Deploy Preview https://deploy-preview-5167--fastidious-cascaron-4ded94.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sheremet-va
Copy link
Member

Ah, that's where it was used. Can't we just use &?

"dev:ui": "pnpm run dev & pnpm run dev:client"

@posva
Copy link
Contributor Author

posva commented Feb 9, 2024

The main advantage is that this version works on Windows (I think). See https://github.com/mysticatea/npm-run-all/blob/master/docs/run-p.md

@sheremet-va
Copy link
Member

The main advantage is that this version works on Windows (I think). See mysticatea/npm-run-all@master/docs/run-p.md

We use pnpm's shell-emulator, I wonder if it will just work 🤔

@hi-ogawa
Copy link
Contributor

hi-ogawa commented Feb 10, 2024

Thanks for the PR. I also noticed that and just wanted to confirm with others.

There are two run-p and I'm currently hitting the first one which fails when running pnpm dev from root:

$ pnpm dev
...
packages/browser dev: command not found: run-p
packages/browser dev: Failed
/home/hiroshi/code/others/vitest/packages/browser:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @vitest/[email protected] dev: `rimraf dist && run-p dev:node dev:client`
Exit status 127
 ELIFECYCLE  Command failed with exit code 1.

"dev:client": "vite build src/client --watch",
"dev:node": "rollup -c --watch --watch.include 'src/node/**'",
"dev": "rimraf dist && run-p dev:node dev:client",

"dev:client": "vite",
"dev": "rollup -c --watch --watch.include 'node/**'",
"dev:ui": "run-p dev dev:client",

How about using pnpm run with regex? Something like this:

(EDIT: created a PR #5174)

diff --git a/packages/browser/package.json b/packages/browser/package.json
index efeba6c3..8f1c4b4c 100644
--- a/packages/browser/package.json
+++ b/packages/browser/package.json
@@ -49 +49 @@
-    "dev": "rimraf dist && run-p dev:node dev:client",
+    "dev": "rimraf dist && pnpm run --stream '/^dev:/'",
diff --git a/packages/ui/package.json b/packages/ui/package.json
index b7189664..70412026 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -43 +43 @@
-    "dev:ui": "run-p dev dev:client",
+    "dev:ui": "pnpm run --stream '/^(dev|dev:client)$/'",

@hi-ogawa hi-ogawa mentioned this pull request Feb 10, 2024
6 tasks
@sheremet-va
Copy link
Member

We merged pnpm --stream instead

@posva posva deleted the fix/local-dev branch February 10, 2024 09:57
@posva
Copy link
Contributor Author

posva commented Feb 10, 2024

Nice, I didn't know about this pnpm feature

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

Successfully merging this pull request may close these issues.

3 participants