前提・実現したいこと
nuxtのコンテナを立ち上げる時(というよりnpm run dev
をした時)エラーが起こります。
発生している問題・エラーメッセージ
USER1 tool % docker-compose up nuxt Recreating nuxt_1 ... done Attaching to nuxt_1 nuxt_1 | nuxt_1 | > nuxt@2.14.0 postinstall /project/app/node_modules/nuxt nuxt_1 | > opencollective || exit 0 nuxt_1 | nuxt_1 | sh: 1: opencollective: not found nuxt_1 | npm WARN eslint-plugin-vue@6.2.2 requires a peer of eslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. nuxt_1 | nuxt_1 | added 141 packages from 71 contributors, removed 307 packages, updated 194 packages and audited 2082 packages in 130.485s nuxt_1 | nuxt_1 | 68 packages are looking for funding nuxt_1 | run `npm fund` for details nuxt_1 | nuxt_1 | found 5 vulnerabilities (3 low, 2 high) nuxt_1 | run `npm audit fix` to fix them, or `npm audit` for details nuxt_1 | nuxt_1 | > tool@1.0.0 dev /project/app nuxt_1 | > nuxt-ts nuxt_1 | nuxt_1 | sh: 1: nuxt-ts: not found nuxt_1 | npm ERR! code ELIFECYCLE nuxt_1 | npm ERR! syscall spawn nuxt_1 | npm ERR! file sh nuxt_1 | npm ERR! errno ENOENT nuxt_1 | npm ERR! tool@1.0.0 dev: `nuxt-ts` nuxt_1 | npm ERR! spawn ENOENT nuxt_1 | npm ERR! nuxt_1 | npm ERR! Failed at the tool@1.0.0 dev script. nuxt_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above. nuxt_1 | nuxt_1 | npm ERR! A complete log of this run can be found in: nuxt_1 | npm ERR! /root/.npm/_logs/2020-09
該当のソースコード
[docker-compose.yml]
yaml
1version: '3' 2services: 3 nuxt: 4 build: ./nuxt 5 volumes: 6 - ./nuxt:/project 7 working_dir: /project/app 8 command: bash -c "npm install && npm run dev" 9 ports: 10 - 3000:3000
試したこと
docker-compose.ymlをcommand: bash -c "npm install && npm audit fix && npm run dev"
にしてdocker-compose up nuxt
[ターミナル]
USER1 tool % docker-compose up nuxt Recreating nuxt_1 ... done Attaching to pnuxt_1 nuxt_1 | npm WARN eslint-plugin-vue@6.2.2 requires a peer of eslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. nuxt_1 | nuxt_1 | audited 2082 packages in 23.657s nuxt_1 | nuxt_1 | 74 packages are looking for funding nuxt_1 | run `npm fund` for details nuxt_1 | nuxt_1 | found 5 vulnerabilities (3 low, 2 high) nuxt_1 | run `npm audit fix` to fix them, or `npm audit` for details nuxt_1 | npm WARN eslint-plugin-vue@6.2.2 requires a peer of eslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. nuxt_1 | nuxt_1 | updated 3 packages in 23.433s nuxt_1 | nuxt_1 | 74 packages are looking for funding nuxt_1 | run `npm fund` for details nuxt_1 | nuxt_1 | fixed 5 of 5 vulnerabilities in 2082 scanned packages nuxt_1 | nuxt_1 | > learning_tool@1.0.0 dev /project/app nuxt_1 | > nuxt-ts nuxt_1 | nuxt_1 | sh: 1: nuxt-ts: not found nuxt_1 | npm ERR! code ELIFECYCLE nuxt_1 | npm ERR! syscall spawn nuxt_1 | npm ERR! file sh nuxt_1 | npm ERR! errno ENOENT nuxt_1 | npm ERR! learning_tool@1.0.0 dev: `nuxt-ts` nuxt_1 | npm ERR! spawn ENOENT nuxt_1 | npm ERR! nuxt_1 | npm ERR! Failed at the learning_tool@1.0.0 dev script. nuxt_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above. nuxt_1 | nuxt_1 | npm ERR! A complete log of this run can be found in: nuxt_1 | npm ERR! /root/.npm/_logs/2020-09-17T01_59_22_998Z-debug.log nuxt_1 exited with code 1
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/09/17 02:50 編集
2020/09/17 02:55