LoginSignup
7
0

More than 3 years have passed since last update.

Docker 問題なかったコンテナでいきなりError: ENOENT: no such file or directory, uv_cwd

Posted at

(自分用メモ)

症状

土日だけ勉強しているとかでPCを久々に開いた時にコンテナ立ち上げたときに
ちゃんと今まで通りに動かない場合がある。

Error: ENOENT: no such file or directory, uv_cwd とかのエラーがでる。

npm list とか打っただけで以下の通り

$ npm list
Error: ENOENT: no such file or directory, uv_cwd
    at process.wrappedCwd (internal/bootstrap/switches/does_own_process_state.js:129:28)
    at process.cwd (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:10:19)
    at Conf.loadPrefix (/usr/local/lib/node_modules/npm/lib/config/load-prefix.js:46:24)
    at load_ (/usr/local/lib/node_modules/npm/lib/config/core.js:109:8)
    at Conf.<anonymous> (/usr/local/lib/node_modules/npm/lib/config/core.js:96:5)
    at Conf.emit (events.js:315:20)
    at ConfigChain._resolve (/usr/local/lib/node_modules/npm/node_modules/config-chain/index.js:281:34)
    at ConfigChain.add (/usr/local/lib/node_modules/npm/node_modules/config-chain/index.js:259:10)
    at Conf.add (/usr/local/lib/node_modules/npm/lib/config/core.js:338:27)
    at Conf.<anonymous> (/usr/local/lib/node_modules/npm/lib/config/core.js:314:25)
internal/bootstrap/switches/does_own_process_state.js:129
    cachedCwd = rawMethods.cwd();
                           ^

Error: ENOENT: no such file or directory, uv_cwd
    at process.wrappedCwd (internal/bootstrap/switches/does_own_process_state.js:129:28)
    at process.cwd (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:10:19)
    at process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:181:30)
    at process.emit (events.js:315:20)
    at process._fatalException (internal/process/execution.js:165:25) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'uv_cwd'
}

解決策

(自分の場合はMAC)起動しているdocker自体を再起動してやりましょう。
アイコン右クリックでrestart的な

これでもう一度コンテナ立ち上げてやるとちゃんと動きました。

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