LoginSignup
2
2

More than 1 year has passed since last update.

nodist でnodeを切り替えていると npx create-react app が動かなくてはまる

Posted at

nodist で node のバージョン切り替えをしているとはまりました。

Windows環境です。

そのときのメモです。
解決策は、ありませんというか、nodist 使うのやめます。

nodist で node を切り替えていました。

> nodist -v
0.9.1
> nodist
  (x64)
  11.13.0  (global: 11.13.0)
> 15.13.0

この状態で、次のコマンドがエラーになりました。

> npx create-react-app my-app
npm ERR! cb.apply is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\<UserName>\AppData\Roaming\npm-cache\_logs\2021-07-25T01_47_20_805Z-debug.log
Install for [ 'create-react-app@latest' ] failed with code 1

ネットでいろいろさぐって、Roaming内のキャッシュを消せやなんだかんだとあったのですがいろいろ試しても解決せず。

なんで変なことしてないのに npx create-react-app が動かないんだと探っていたら、nodist を使っていたことを思い出しました。

nodist で node 11.13.0 に切り替えると正常動作しました。

node の切り替えは純粋なインストーラーとかでやったほうがいいと思いました。

以上です。

2
2
2

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
2