create-react-app 에러
-
게시물 수정 , 삭제는 로그인 필요
만들고싶은 웹 페이지가 있는데
리액트를 사용해서 만드려고 하니 에러가 발생합니다.
원래는 이고잉님의 수업을 따라가고있었으나 같은 곳에서 계속 에러가 나서
이 페이지에서 설명해주는 방식 대로 진행했는데도 같은 곳에서 에러가 납니다.
npx create-react-app my-app 까지는 문제 없이 수행이 되고
my-app으로 이동해서
npm start
를 하면 에러가 나며 웹 페이지가 열리지 않습니다.
node.js는 프로그램을 모아놓은 D드라이브에 설치되어있고
혹시나 싶어서 여러 번 지웠다 다시 갈았음에도 같은 곳에서 에러가 나옵니다.
에러 코드
C:\Users\madlo>cd my-app
C:\Users\madlo\my-app>npm start
> [email protected] start C:\Users\madlo\my-app
> react-scripts start
i 「wds」: Project is running at http://172.30.1.8/
i 「wds」: webpack output is served from
i 「wds」: Content not from webpack is served from C:\Users\madlo\my-app\public
i 「wds」: 404s will fallback to /
Starting the development server...
events.js:287
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\madlo\AppData\Roaming\npm-cache\_logs\2020-05-25T15_13_30_609Z-debug.log
로그내용
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'D:\\nodejs\\node.exe',
1 verbose cli 'D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\madlo\my-app\node_modules\.bin;C:\Python38\Scripts\;C:\Python38\;C:\Python27\;C:\Python27\Scripts;D:\Dev_tools\Git\cmd;C:\ProgramData\chocolatey\bin;D:\nodejs\;C:\Users\madlo\AppData\Local\Microsoft\WindowsApps;C:\Android\sdk\emulator;C:\Android\sdk\platform-tools;C:\Android\sdk\tools;C:\Program Files\Bandizip\;D:\Microsoft VS Code\Microsoft VS Code\bin;C:\Users\madlo\AppData\Roaming\npm
9 verbose lifecycle [email protected]~start: CWD: C:\Users\madlo\my-app
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\madlo\my-app
16 verbose Windows_NT 10.0.18363
17 verbose argv "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.16.3
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `react-scripts start`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
추가로 확인하고싶으신 내용이 있다면 말해주세요..
리액트를 사용해서 만드려고 하니 에러가 발생합니다.
원래는 이고잉님의 수업을 따라가고있었으나 같은 곳에서 계속 에러가 나서
이 페이지에서 설명해주는 방식 대로 진행했는데도 같은 곳에서 에러가 납니다.
npx create-react-app my-app 까지는 문제 없이 수행이 되고
my-app으로 이동해서
npm start
를 하면 에러가 나며 웹 페이지가 열리지 않습니다.
node.js는 프로그램을 모아놓은 D드라이브에 설치되어있고
혹시나 싶어서 여러 번 지웠다 다시 갈았음에도 같은 곳에서 에러가 나옵니다.
에러 코드
C:\Users\madlo>cd my-app
C:\Users\madlo\my-app>npm start
> [email protected] start C:\Users\madlo\my-app
> react-scripts start
i 「wds」: Project is running at http://172.30.1.8/
i 「wds」: webpack output is served from
i 「wds」: Content not from webpack is served from C:\Users\madlo\my-app\public
i 「wds」: 404s will fallback to /
Starting the development server...
events.js:287
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\madlo\AppData\Roaming\npm-cache\_logs\2020-05-25T15_13_30_609Z-debug.log
로그내용
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'D:\\nodejs\\node.exe',
1 verbose cli 'D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\madlo\my-app\node_modules\.bin;C:\Python38\Scripts\;C:\Python38\;C:\Python27\;C:\Python27\Scripts;D:\Dev_tools\Git\cmd;C:\ProgramData\chocolatey\bin;D:\nodejs\;C:\Users\madlo\AppData\Local\Microsoft\WindowsApps;C:\Android\sdk\emulator;C:\Android\sdk\platform-tools;C:\Android\sdk\tools;C:\Program Files\Bandizip\;D:\Microsoft VS Code\Microsoft VS Code\bin;C:\Users\madlo\AppData\Roaming\npm
9 verbose lifecycle [email protected]~start: CWD: C:\Users\madlo\my-app
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\madlo\my-app
16 verbose Windows_NT 10.0.18363
17 verbose argv "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.16.3
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `react-scripts start`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
추가로 확인하고싶으신 내용이 있다면 말해주세요..
#create-react-app 에러 #npm create-react-app 에러 #npx create-react-app 에러 enoent