npm自体のアップデートをnpmコマンドでする
npmのバージョンによってnpxが使えなかったりします。
そんな時にnpm自体のバージョンアップをnpmコマンドで行います。
$ npm -v 4.0.5 $ npm install -g npm ~省略 $ npm -v 6.0.0
これでnpmのバージョンが上がりました。
engine Unsupported engine
「engine Unsupported engine」エラーが出る場合があります。
C:\Users\takahashi-h5>npm i -g npm npm ERR! code EBADENGINE npm ERR! engine Unsupported engine npm ERR! engine Not compatible with your version of node/npm: npm@10.5.0 npm ERR! notsup Not compatible with your version of node/npm: npm@10.5.0 npm ERR! notsup Required: {"node":"^18.17.0 || >=20.5.0"} npm ERR! notsup Actual: {"npm":"9.5.1","node":"v18.16.1"}
先にnodeのバージョンを上げます。
C:\Users\takahashi-h5>nvm install 20.5.0 ... C:\Users\takahashi-h5>node -v v20.5.0
バージョンアップしたら再度npm i -g npm
を実行します。
C:\Users\takahashi-h5>npm i -g npm ... C:\Users\takahashi-h5>npm -v 10.5.0

KHI入社して退社。今はCONFRAGEで正社員です。関西で140-170/80~120万から受け付けております^^
得意技はJS(ES6),Java,AWSの大体のリソースです
コメントはやさしくお願いいたします^^
座右の銘は、「狭き門より入れ」「願わくは、我に七難八苦を与えたまえ」です^^
コメント