ESLint「 kintone-customize-es5」が見つからない

初めて投稿させていただきます。

https://developer.cybozu.io/hc/ja/articles/360000098886 

こちらを参考にESLintを導入したのですが

kintone-customize-es5が見つからずESLintが実行出来ないというエラーが出てきて困っています。

実際に「C:\Users\PCNAME\AppData\Roamingpmode_modules@cybozu\eslint-config\presets\kintone-customize-es5.js」が存在するのは確認出来ています。

Node.jsをアンインストール、npmフォルダ、npm-cacheフォルダを削除後、再インストールを行いましたが、状況が変わりません。

npmの構造とエラー文は以下のようになります。

>npm ls -g --depth=0

C:\Users\PCNAME\AppData\Roamingpm
±- @cybozu/eslint-config@6.0.2
±- eslint@6.1.0
±- eslint-plugin-import@2.18.2
±- prettier@1.18.2
`-- typescript@3.5.3

npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/eslint-plugin@1.13.0
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/parser@1.13.0

 

>eslint test/test.js

Oops! Something went wrong! :frowning:

ESLint: 6.1.0.

ESLint couldn’t find the config “@cybozu/eslint-config/presets/kintone-customize-es5” to extend from. Please check that the name of the config is correct.

The config “@cybozu/eslint-config/presets/kintone-customize-es5” was referenced from the config file in “C:\Users\PCNAME\js.eslintrc.js”.

If you still have problems, please stop by https://gitter.im/eslint/eslint to chat with the team.

 

また、.eslintrc.jsの中身は以下のようになっています。

module.exports = {
“extends”: “@cybozu/eslint-config/presets/kintone-customize-es5”
};

どなたか対応方法を教えていただけませんか?よろしくお願いします。

自己解決しました。

https://techacademy.jp/magazine/16113

こちらの手順で[global.module.paths]に[npm root -g]が存在しないのを確認したあと

[npm root -g]の値を[set NODE_PATH={rootの値}]で追加して、[global.module.paths]に追加されていれば実行することが出来ました。

 

/*

前環境で構築した際は

https://developer.cybozu.io/hc/ja/articles/360000098886 

こちらの手順で何も悩まなかったのですが、コメント欄を見ると同様の状況で悩んでる方がいらっしゃる?ようです

nodeに関しては詳しくないため図付きでの説明は助かるので、追加手順が必要であるなら追記があれば良いのにな。と思いました。

*/

このトピックはベストアンサーに選ばれた返信から 3 日が経過したので自動的にクローズされました。新たに返信することはできません。