You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What package manager are you using / does the bug impact?
Yarn v1
What operating system are you using?
Mac
Describe the Bug
The bug is related to #3364. Although it worked there, in my case, I am getting some other error after following the steps. error An unexpected error occurred: "Cannot create property '-node-bit-dev' on string '{\"-node-bit-dev\":\"\"}'".
➜ opub-mono git:(dev) ✗ git commit -m "lint test"
yarn run v1.22.19
$ /Users/pixeled/dev/opub-mono/node_modules/.bin/lint-staged
✔ Preparing lint-staged...
✔ Hiding unstaged changes to partially staged files...
❯ Running tasks for staged files...
❯ package.json — 2 files
❯ *.{js,jsx,ts,tsx} — 1 file
✖ yarn lint [FAILED]
◼ yarn format
↓ Skipped because of errors from tasks. [SKIPPED]
↓ Skipped because of errors from tasks. [SKIPPED]
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...
✖ yarn lint:
web:lint: ERROR: command finished with error: command (/Users/pixeled/dev/opub-mono/apps/web) yarn run lint -- /Users/pixeled/dev/opub-mono/apps/web/pages/_app.tsx exited (1)
command (/Users/pixeled/dev/opub-mono/apps/web) yarn run lint -- /Users/pixeled/dev/opub-mono/apps/web/pages/_app.tsx exited (1)
ERROR run failed: command exited (1)
error Command failed with exit code 1.
$ turbo run lint -- /Users/pixeled/dev/opub-mono/apps/web/pages/_app.tsx
• Packages in scope: @opub-cdl/ui, docs, eslint-config-custom, tsconfig, web
• Running lint in 5 packages
• Remote caching disabled
docs:lint: cache miss, executing c1335871bee84900
@opub-cdl/ui:lint: cache miss, executing 10e8c911e177e152
web:lint: cache miss, executing 381c409bd867d3a1
error An unexpected error occurred: "Cannot create property '-node-bit-dev' on string '{\"-node-bit-dev\":\"\"}'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/pixeled/dev/opub-mono/apps/web/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error An unexpected error occurred: "Cannot create property '-node-bit-dev' on string '{\"-node-bit-dev\":\"\"}'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/pixeled/dev/opub-mono/apps/docs/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error An unexpected error occurred: "Cannot create property '-node-bit-dev' on string '{\"-node-bit-dev\":\"\"}'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/pixeled/dev/opub-mono/packages/opub-ui/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Tasks: 0 successful, 3 total
Cached: 0 cached, 3 total
Time: 1.223s
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky - pre-commit hook exited with code 1 (error)
I think I know what's going on here: lint-staged is passing the list of changed files to the yarn lint script. This script is not configured in such a way to handle individual files, as it is fanning out to running lint in each workspace. In this case I would configure lint-staged to use eslint directly, which can accept individual file paths.
But "lint-staged" passes modified file name as an argument and tries to run task "test" in that file:
turbo run test:
ERROR run failed: error preparing engine: Could not find the following tasks in project: /dev/turborepo-demo/packages/ui/src/Button/Button.tsx
Turbo error: error preparing engine: Could not find the following tasks in project: /dev/turborepo-demo/packages/ui/src/Button/Button.tsx
What version of Turborepo are you using?
1.8.8
What package manager are you using / does the bug impact?
Yarn v1
What operating system are you using?
Mac
Describe the Bug
The bug is related to #3364. Although it worked there, in my case, I am getting some other error after following the steps.
error An unexpected error occurred: "Cannot create property '-node-bit-dev' on string '{\"-node-bit-dev\":\"\"}'".
Repo: https://github.com/CivicDataLab/opub-mono.git
Full Error:
Expected Behavior
I should be able to use
husky
withlint-staged
To Reproduce
lint-staged
inpackage.json
<- This will break commitReproduction Repo
https://github.com/CivicDataLab/opub-mono.git
The text was updated successfully, but these errors were encountered: