2
0

More than 1 year has passed since last update.

⚠️【nodist】`npm i`実行時の`cb.apply is not a function`【Windows環境】

Last updated at Posted at 2021-02-22

nodistが.node-versionファイルを参照したり、自分でNode.jsのカレントバージョンを変更したりすると、Node.jsとnpmのバージョンがずれてしまうことがあります。

npm ERR! cb.apply is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\*****\AppData\Roaming\npm-cache\_logs\yyyy-mm-ddTXX_XX_XX_XXXX-debug.log

そういうときは、次のコマンドを叩くかnpmをインストールしなおしてnpmコマンドのバージョンをNode.jsのバージョンにそろえてあげます。

nodist npm match

これで無事にnpmコマンドが利用できるようになります。
もしこれでも改善されない場合は、npmを再インストールしてください。

そもそもnodist npm matchが実行できない場合はtaketakekahoさんのnodistでnpmとNode.jsのバージョンが合わせられずエラーとなったをご参照ください。


2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0