node」タグアーカイブ

[docker]Error: Cannot find module ‘timers/promises'[起動しない]

ある日、コンテナをビルドしなおしてみるとエラーとなってコンテナが起動しない。

container_name  | /usr/local/lib/node_modules/npm/lib/es6/validate-engines.js:31
container_name  |     throw err
container_name  |     ^
container_name  |
container_name  | Error: Cannot find module 'timers/promises'
container_name  | Require stack:
container_name  | - /usr/local/lib/node_modules/npm/node_modules/@npmcli/agent/lib/util.js
container_name  | - /usr/local/lib/node_modules/npm/node_modules/@npmcli/agent/lib/index.js
container_name  | - /usr/local/lib/node_modules/npm/node_modules/make-fetch-happen/lib/remote.js
container_name  | - /usr/local/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/entry.js
container_name  | - /usr/local/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js
container_name  | - /usr/local/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js
container_name  | - /usr/local/lib/node_modules/npm/node_modules/make-fetch-happen/lib/index.js
container_name  | - /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/index.js
container_name  | - /usr/local/lib/node_modules/npm/lib/utils/replace-info.js
container_name  | - /usr/local/lib/node_modules/npm/lib/utils/error-message.js
container_name  | - /usr/local/lib/node_modules/npm/lib/utils/exit-handler.js
container_name  | - /usr/local/lib/node_modules/npm/lib/cli-entry.js
container_name  | - /usr/local/lib/node_modules/npm/lib/cli.js
container_name  | - /usr/local/lib/node_modules/npm/bin/npm-cli.js
container_name  |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
container_name  |     at Function.Module._load (internal/modules/cjs/loader.js:725:27)
container_name  |     at Module.require (internal/modules/cjs/loader.js:952:19)
container_name  |     at require (internal/modules/cjs/helpers.js:88:18)
container_name  |     at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/agent/lib/util.js:3:16)
container_name  |     at Module._compile (internal/modules/cjs/loader.js:1063:30)
container_name  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
container_name  |     at Module.load (internal/modules/cjs/loader.js:928:32)
container_name  |     at Function.Module._load (internal/modules/cjs/loader.js:769:14)
container_name  |     at Module.require (internal/modules/cjs/loader.js:952:19) {
container_name  |   code: 'MODULE_NOT_FOUND',
container_name  |   requireStack: [
container_name  |     '/usr/local/lib/node_modules/npm/node_modules/@npmcli/agent/lib/util.js',
container_name  |     '/usr/local/lib/node_modules/npm/node_modules/@npmcli/agent/lib/index.js',
container_name  |     '/usr/local/lib/node_modules/npm/node_modules/make-fetch-happen/lib/remote.js',
container_name  |     '/usr/local/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/entry.js',
container_name  |     '/usr/local/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js',
container_name  |     '/usr/local/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js',
container_name  |     '/usr/local/lib/node_modules/npm/node_modules/make-fetch-happen/lib/index.js',
container_name  |     '/usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/index.js',
container_name  |     '/usr/local/lib/node_modules/npm/lib/utils/replace-info.js',
container_name  |     '/usr/local/lib/node_modules/npm/lib/utils/error-message.js',
container_name  |     '/usr/local/lib/node_modules/npm/lib/utils/exit-handler.js',
container_name  |     '/usr/local/lib/node_modules/npm/lib/cli-entry.js',
container_name  |     '/usr/local/lib/node_modules/npm/lib/cli.js',
container_name  |     '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
container_name  |   ]
container_name  | }
container_name exited with code 7
続きを読む

古いLaradockを利用するとworkspaceコンテナが落ちる

とある開発環境をLaradockで構築しており、久しぶりに起動してみることに。

コンテナをbuildしていくと、途中で落ちる現象にぶち当たる。

 => ERROR [laradock_workspace 54/92] RUN if [ true = true ]; then     mk  34.7s
------
 > [laradock_workspace 54/92] RUN if [ true = true ]; then     mkdir -p /home/laradock/.nvm &&     curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash         && . /home/laradock/.nvm/nvm.sh         && nvm install node         && nvm use node         && nvm alias node         && if [  ]; then         npm config set registry          ;fi         && if [ true = true ]; then         npm install -g gulp         ;fi         && if [ false = true ]; then         npm install -g bower         ;fi         && if [ true = true ]; then         npm install -g @vue/cli         ;fi         && if [ false = true ]; then         npm install -g @angular/cli         ;fi         && ln -s `npm bin --global` /home/laradock/.node-bin ;fi:
#0 0.260   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#0 0.268                                  Dload  Upload   Total   Spent    Left  Speed
100 12819  100 12819    0     0  15831      0 --:--:-- --:--:-- --:--:-- 15924
#0 1.091 => Downloading nvm from git to '/home/laradock/.nvm'
=> Cloning into '/home/laradock/.nvm'...
#0 2.918 => Compressing and cleaning up git repository
#0 2.970
#0 3.031 => Appending nvm source string to /home/laradock/.bashrc
#0 3.058 => Appending bash_completion source string to /home/laradock/.bashrc
#0 3.206 => Installing Node.js version node
#0 13.11 Downloading and installing node v19.3.0...
#0 13.88 Downloading https://nodejs.org/dist/v19.3.0/node-v19.3.0-linux-x64.tar.xz...
######################################################################## 100.0%
#0 15.90 Computing checksum with sha256sum
#0 16.19 Checksums matched!
#0 22.75 node: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by node)
#0 22.75 node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by node)
#0 22.75 node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
#0 22.85 nvm is not compatible with the npm config "prefix" option: currently set to ""
#0 22.85 Run `nvm use --delete-prefix v19.3.0` to unset it.
#0 23.71 Failed to install Node.js node
#0 23.71 => Close and reopen your terminal to start using nvm or run the following to use it now:
#0 23.71
#0 23.71 export NVM_DIR="$HOME/.nvm"
#0 23.71 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
#0 23.71 [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
#0 32.22 v19.3.0 is already installed.
#0 32.76 node: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by node)
#0 32.76 node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by node)
#0 32.76 node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
#0 32.84 nvm is not compatible with the npm config "prefix" option: currently set to ""
#0 32.84 Run `nvm use --delete-prefix v19.3.0` to unset it.
#0 33.53 Creating default alias: default -> node (-> v19.3.0)
#0 34.55 node: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by node)
#0 34.55 node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by node)
#0 34.55 node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
#0 34.63 nvm is not compatible with the npm config "prefix" option: currently set to ""
#0 34.63 Run `nvm use --delete-prefix v19.3.0` to unset it.

以前は正常に起動していたのに。

なぜ・・・・。

続きを読む