teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

errorを追加した

2021/02/04 08:54

投稿

BoKuToTuZenU
BoKuToTuZenU

スコア51

title CHANGED
File without changes
body CHANGED
@@ -101,4 +101,84 @@
101
101
 
102
102
  # ためしたこと、
103
103
  Dockerfileにたいして、```RUN npm install```を```RUN yarn install```に変更。
104
+ ```
105
+ npm notice
106
+ npm notice New patch version of npm available! 7.5.1 -> 7.5.2
107
+ npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.5.2>
108
+ npm notice Run `npm install -g npm@7.5.2` to update!
109
+ npm notice
110
+ npm ERR! code ERESOLVE
111
+ npm ERR! ERESOLVE unable to resolve dependency tree
112
+ npm ERR!
113
+ npm ERR! Found: react@17.0.1
114
+ npm ERR! node_modules/react
115
+ npm ERR! react@"^17.0.1" from the root project
116
+ npm ERR! peer react@"*" from @testing-library/react@11.2.5
117
+ npm ERR! node_modules/@testing-library/react
118
+ npm ERR! @testing-library/react@"^11.1.0" from the root project
119
+ npm ERR! 3 more (react-dom, react-scripts, reactstrap)
120
+ npm ERR!
121
+ npm ERR! Could not resolve dependency:
122
+ npm ERR! peer react@"0.14.x || ^15.0.0 || ^16.0.0" from react-popper@1.3.7
123
+ npm ERR! node_modules/reactstrap/node_modules/react-popper
124
+ npm ERR! react-popper@"^1.3.6" from reactstrap@8.9.0
125
+ npm ERR! node_modules/reactstrap
126
+ npm ERR! reactstrap@"^8.9.0" from the root project
127
+ npm ERR!
128
+ npm ERR! Fix the upstream dependency conflict, or retry
129
+ npm ERR! this command with --force, or --legacy-peer-deps
130
+ npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
131
+ npm ERR!
132
+ npm ERR! See /root/.npm/eresolve-report.txt for a full report.
133
+
134
+ npm ERR! A complete log of this run can be found in:
135
+ npm ERR! /root/.npm/_logs/2021-02-04T08_40_33_006Z-debug.log
136
+ ```
137
+
104
- node_moudelsをマウントして、package.jsonのreact_scriptsのpathを変更した
138
+ node_moudelsをマウントして、package.jsonのreact_scriptsのpathを変更した
139
+
140
+ ```
141
+ frontend_1 |
142
+ frontend_1 | removed 317 packages, and audited 1835 packages in 3s
143
+ frontend_1 |
144
+ frontend_1 | found 0 vulnerabilities
145
+ frontend_1 | npm notice
146
+ frontend_1 | npm notice New patch version of npm available! 7.5.1 -> 7.5.2
147
+ frontend_1 | npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.5.2>
148
+ frontend_1 | npm notice Run `npm install -g npm@7.5.2` to update!
149
+ frontend_1 | npm notice
150
+ frontend_1 | yarn run v1.22.5
151
+ frontend_1 | $ react-scripts start
152
+ frontend_1 | node:internal/modules/cjs/loader:928
153
+ frontend_1 | throw err;
154
+ frontend_1 | ^
155
+ frontend_1 |
156
+ frontend_1 | Error: Cannot find module 'rollup-plugin-babel'
157
+ frontend_1 | Require stack:
158
+ frontend_1 | - /frontend/node_modules/workbox-build/build/lib/bundle.js
159
+ frontend_1 | - /frontend/node_modules/workbox-webpack-plugin/build/generate-sw.js
160
+ frontend_1 | - /frontend/node_modules/workbox-webpack-plugin/build/index.js
161
+ frontend_1 | - /frontend/node_modules/react-scripts/config/webpack.config.js
162
+ frontend_1 | - /frontend/node_modules/react-scripts/scripts/start.js
163
+ frontend_1 | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)
164
+ frontend_1 | at Function.Module._load (node:internal/modules/cjs/loader:769:27)
165
+ frontend_1 | at Module.require (node:internal/modules/cjs/loader:997:19)
166
+ frontend_1 | at require (node:internal/modules/cjs/helpers:92:18)
167
+ frontend_1 | at Object.<anonymous> (/frontend/node_modules/workbox-build/build/lib/bundle.js:22:15)
168
+ frontend_1 | at Module._compile (node:internal/modules/cjs/loader:1108:14)
169
+ frontend_1 | at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
170
+ frontend_1 | at Module.load (node:internal/modules/cjs/loader:973:32)
171
+ frontend_1 | at Function.Module._load (node:internal/modules/cjs/loader:813:14)
172
+ frontend_1 | at Module.require (node:internal/modules/cjs/loader:997:19) {
173
+ frontend_1 | code: 'MODULE_NOT_FOUND',
174
+ frontend_1 | requireStack: [
175
+ frontend_1 | '/frontend/node_modules/workbox-build/build/lib/bundle.js',
176
+ frontend_1 | '/frontend/node_modules/workbox-webpack-plugin/build/generate-sw.js',
177
+ frontend_1 | '/frontend/node_modules/workbox-webpack-plugin/build/index.js',
178
+ frontend_1 | '/frontend/node_modules/react-scripts/config/webpack.config.js',
179
+ frontend_1 | '/frontend/node_modules/react-scripts/scripts/start.js'
180
+ frontend_1 | ]
181
+ frontend_1 | }
182
+ frontend_1 | error Command failed with exit code 1.
183
+ frontend_1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
184
+ ```

3

タイトルをわかりやすくした

2021/02/04 08:54

投稿

BoKuToTuZenU
BoKuToTuZenU

スコア51

title CHANGED
@@ -1,1 +1,1 @@
1
- docker-composeをもちいてReactを実行した
1
+ docker-compose,Reactにおける/bin/sh: 1: react-scripts: not foundの解決方法につ
body CHANGED
File without changes

2

追加の情報を記載した

2021/02/04 07:45

投稿

BoKuToTuZenU
BoKuToTuZenU

スコア51

title CHANGED
File without changes
body CHANGED
@@ -100,4 +100,5 @@
100
100
  ```
101
101
 
102
102
  # ためしたこと、
103
- Dockerfileにたいして、```RUN npm install```を```RUN yarn install```に変更。
103
+ Dockerfileにたいして、```RUN npm install```を```RUN yarn install```に変更。
104
+ node_moudelsをマウントして、package.jsonのreact_scriptsのpathを変更した

1

typoを修正しました。

2021/02/04 07:35

投稿

BoKuToTuZenU
BoKuToTuZenU

スコア51

title CHANGED
File without changes
body CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  WORKDIR /frontend
48
48
 
49
- COPY package.json /backend
49
+ COPY package.json /frontend
50
50
  RUN yarn install
51
51
  COPY . /frontend
52
52