Giter Site home page Giter Site logo

Comments (4)

ryancwalsh avatar ryancwalsh commented on June 14, 2024

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.

ryancwalsh avatar ryancwalsh commented on June 14, 2024

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.

iiroj avatar iiroj commented on June 14, 2024

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.

ryancwalsh avatar ryancwalsh commented on June 14, 2024

Thanks.

from lint-staged.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.