Comments (4)
I think I had Node.js: v18.18.0 via nvm but 12.12 on my system. So I uninstalled node at my system level so that now Node only exists via nvm.
Now I get this error in my commit attempt:
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
/usr/bin/env: ‘node’: No such file or directory
husky - pre-commit hook exited with code 127 (error)
from lint-staged.
As I mentioned at https://stackoverflow.com/questions/67063993/sh-husky-command-not-found#comment136565022_72617424, I'll now try to figure out whether VSC is the problem.
Husky successfully called lint-staged when I do the git commit in the Ubuntu terminal instead of VSC, even without making a ~/.huskyrc
as https://typicode.github.io/husky/troubleshooting.html suggests.
I thought typicode/husky#953 or ohmyzsh/ohmyzsh#9252 or typicode/husky#1025 or https://stackoverflow.com/questions/67198286/how-to-make-shell-agnostic-a-husky-hook would be related, but now I think there is just something about VSC that I need to learn.
from lint-staged.
Unfortunately I can't give support for configuration setup on Ubuntu, but it sounds like you are on the right track. If lint-staged works in your terminal but not when called through husky, I would take a look at where node
is installed and whether it's available in your $PATH
.
from lint-staged.
Thanks.
from lint-staged.
Related Issues (20)
- Failed to resolve git repo on mapped network drive HOT 12
- Commits from Github Desktop occur errors HOT 4
- Not all lintstagedrc.json files are found in the rush.js monorepo HOT 4
- Type '(filenames: string[]) => Commands | Promise<Commands>' is not assignable to type 'string' HOT 2
- There is a bug with bracketed folders HOT 5
- Importing a reusable json file to ESM JS config fails HOT 1
- Path for baseConfig HOT 2
- lint-staged is unable to resolve path to module in Monorepo with map imports HOT 9
- Many errors in standard output when using git sparse-checkout HOT 4
- `--all` flag HOT 3
- lint-staged repeat many time ,when commit in windows powershell,cmd HOT 2
- [feat] override the current pattern HOT 1
- Make lint-staged more compatible with git sparse checkout feature HOT 6
- How to `git reset $file` ? HOT 3
- How to output the print content of the script in lint-staged in real time?
- `npx lint-staged --cwd $PWD` for all OS HOT 6
- Hooks to know if the lint staged commands have completed HOT 4
- Prettier breaks when run through lint-staged on files with dollar sign ($) in the name HOT 6
- Consider allowing running of programatic tasks via Node API HOT 5
- Is it possible to run 2 different configurations for pre-commit and pre-push? HOT 1
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 lint-staged.