質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Q&A

0回答

3369閲覧

npmでwebpackインストールエラー

otaks

総合スコア223

npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

0グッド

0クリップ

投稿2018/05/22 08:32

編集2022/01/12 10:55

npmでwebpackをインストールしようとすると以下エラーがでます。
対処法を教えてください。
初めはネットワークエラーのようでしたが、何度かすると異なるエラーが出てきました。このようなことはよくあるのでしょうか?

C:\99.work\2>npm install -D babel-core babel-loader babel-preset-es2015 webpack
npm WARN deprecated babel-preset-es2015@6.24.1: ???? Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/@webassemblyjs%2fhelper-wasm-bytecode failed, reason: socket hang up
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ohsof\AppData\Roaming\npm-cache_logs\2018-05-22T06_56_14_451Z-debug.log

C:\99.work\2>npm install -D babel-core
npm WARN 2@1.0.0 No description
npm WARN 2@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 68 packages and updated 1 package in 20.998s

C:\99.work\2>npm install -D babel-loader
npm WARN babel-loader@7.1.4 requires a peer of webpack@2 || 3 || 4 but none was installed.
npm WARN 2@1.0.0 No description
npm WARN 2@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 83 packages in 14.112s

C:\99.work\2>npm install -D babel-preset-es2015
npm WARN deprecated babel-preset-es2015@6.24.1: ???? Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN babel-loader@7.1.4 requires a peer of webpack@2 || 3 || 4 but none was installed.
npm WARN 2@1.0.0 No description
npm WARN 2@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 68 packages and updated 1 package in 10.918s

C:\99.work\2>npm install -D webpack

C:\99.work\2>npm update -g npm

C:\99.work\2>npm install -D webpack
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/@webassemblyjs%2ffloating-point-hex-parser failed, reason: socket hang up
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ohsof\AppData\Roaming\npm-cache_logs\2018-05-22T07_13_37_594Z-debug.log

C:\99.work\2>npm install webpack -g
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.4.3.tgz failed, reason: socket hang up
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ohsof\AppData\Roaming\npm-cache_logs\2018-05-22T07_40_24_998Z-debug.log

C:\99.work\2>npm install webpack -g
C:\Users\ohsof\AppData\Roaming\npm\webpack -> C:\Users\ohsof\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js
npm ERR! path C:\Users\ohsof\AppData\Roaming\npm\node_modules\webpack\node_modules\fsevents
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rmdir
npm ERR! Error: EPERM: operation not permitted, rmdir 'C:\Users\ohsof\AppData\Roaming\npm\node_modules\webpack\node_modules\fsevents'
npm ERR! { Error: EPERM: operation not permitted, rmdir 'C:\Users\ohsof\AppData\Roaming\npm\node_modules\webpack\node_modules\fsevents'
npm ERR! stack: 'Error: EPERM: operation not permitted, rmdir 'C:\Users\ohsof\AppData\Roaming\npm\node_modules\webpack\node_modules\fsevents'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rmdir',
npm ERR! path: 'C:\Users\ohsof\AppData\Roaming\npm\node_modules\webpack\node_modules\fsevents' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ohsof\AppData\Roaming\npm-cache_logs\2018-05-22T07_47_43_174Z-debug.log

C:\99.work\2>npm install -D webpack
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN 2@1.0.0 No description
npm WARN 2@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 380 packages in 599.483s

C:\99.work\2>

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問