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

Hooks fail to run npm scripts #699

Open
timjuedemann opened this issue Oct 21, 2022 · 1 comment
Open

Hooks fail to run npm scripts #699

timjuedemann opened this issue Oct 21, 2022 · 1 comment

Comments

@timjuedemann
Copy link

timjuedemann commented Oct 21, 2022

Quick, short summary:
I have npm scripts defined in my package.json (placed in the project root folder) which run just fine from a terminal window opened at the project root. When I try to run the same scripts using a CodeKit hook, I get the following error in the CodeKit console:

/bin/sh: npm: command not found

I gathered that CodeKit uses its own internal version of npm so I assume that there is some sort of collision between the global version of npm I have installed and the internal version used by CodeKit.

Expected results:
npm scripts defined in package.json run as expected when used in a hook.

Actual results:
/bin/sh: npm: command not found

Exact steps to reproduce:

  1. Install npm globally.
  2. Create new project using npm init and add test file to trigger hook.
  3. Create new CodeKit project from project folder.
  4. Add hook to run the default npm test script when test file is changed.
  5. Change test file to trigger hook.

Your configuration (any details about your system that you think might be relevant)
CodeKit 3.16.1

@bdkjones
Copy link
Owner

bdkjones commented Oct 21, 2022 via email

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

No branches or pull requests

2 participants