Hi, I’m committing some changes to a recent pull of grafana/grafana:master, but for some reason now when I try to commit, I get the following error:
↓ Running tasks for *.{ts,tsx} [skipped]
→ No staged files match *.{ts,tsx}
↓ Running tasks for *.scss [skipped]
→ No staged files match *.scss
✔ Running tasks for *pkg/**/*.go
Version 5.3.0-pre1
Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module 'fork-ts-checker-webpack-plugin'
>> No "jscs" targets found.
Warning: Task "jscs" failed. Use --force to continue.
Aborted due to warnings.
husky > pre-commit hook failed (add --no-verify to bypass)
All I’ve done is checkout the most recent master from the grafana repo, made a couple changes to some /pkg/ go files, and tried to git commit -m "blah". I’m not really sure what these checks do, so am tempted to --force, but I ultimately want to submit a pull request to the grafana repo with these changes, so I think I should get around this properly. Any help is appreciated.
I gave that a shot already, but ended up with the following:
yarn install --pure-lockfile
yarn install v1.5.1
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
error mini-css-extract-plugin@0.4.0: The engine "node" is incompatible with this module. Expected version ">= 6.11.5".
error An unexpected error occurred: "Found incompatible module".
info If you think this is a bug, please open a bug report with the information provided in "/Users/ctote/Documents/dev/grafana/src/github.com/grafana/grafana/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
My package.json is at:
commit b0114442461933ca8d37efece2bb0ed2aaf64d43
Author: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Date: Wed Jun 27 11:37:05 2018 +0200
release 5.2.0
The quick (nuclear) option is to just add --ignore-engines to your yarn command. The more correct solution (given in the link) is to:
check your node version with:
$ node -v
check your npm version with:
$ npm -v
Open package.json and make sure the values you got from running the two commands above match with the versions of ‘node’ and ‘npm’ on the document. Mine didn’t so I just changed the values, saved and everything worked fine.