LoginSignup
1
0

More than 5 years have passed since last update.

npm WARN npm npm does not support Node.js v9.2.0

Posted at

npm iでエラーが出ました。 環境はLinux(Ubuntu v16.04)です。

npm WARN npm npm does not support Node.js v9.2.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.
npm WARN npm You can find the latest version at https://nodejs.org/
WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
/home/n0bisuke/.nodebrew/node/v9.2.0/bin/node[40699]: ../src/node_zlib.cc:437:static void node::{anonymous}::ZCtx::Init(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
 1: node::Abort() [npm]
 2: node::Assert(char const* const (*) [4]) [npm]
 3: 0x1255aff [npm]
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [npm]
 5: 0xb77f9c [npm]
 6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [npm]
 7: 0x1131ea0042fd
Aborted (core dumped)

npmとnode.jsを入れ直し

この辺みて対応しました。

It turns out that the current installed npm is not compatible with the new node and has a hard time updating.

The solution is to uninstall npm and then reinstall node which will contain the correct version of npm.

らしいので、npmを一回消してnodeを再インストールすると良さそう。

$ npm uninstall -g npm

で消せばOKとのことです。nodebrewでインストールしてるNode.jsも一回消して再度入れ直します。

  • 削除
$ nodebrew uninstall 9.2.0
  • 再インストール
$ nodebrew install-binary 9.2.0

再チャレンジ

$ npm i

npm WARN assets No description
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 479 packages in 5.897s

問題なく実行できました。

1
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
1
0