해결된 질문
작성
·
11K
0
좋은 강의 정말 잘 듣고 있습니다. 감사합니다.
그런데 제가 [nodemon] app crashed - waiting for file changes before starting... 오류를 종종 겪습니다.
그래서 예전에는 선생님 git hub에서 받았던 파일을 다 지우고 다시 다운받아서 실행하여 오류를 해결했습니다.
그런데 이제는 강의 중간이라 파일을 지우면 여태까지 작성했던 코드들이 다 날라가기 때문에
그렇게 하기가 두렵습니다.
혹시 이렇게 [nodemon] app crashed - waiting for file changes before starting... 오류가 나올 때
어떻게 해야 오류를 잡을 수 있을까요?
> react-boiler-plate@1.0.0 dev C:\Users\ADMIN\Desktop\boilerplate-mern-stack-master\boilerplate-mern-stack-master
> concurrently "npm run backend" "npm run start --prefix client"
[0]
[0] ┌────────────────────────────────────────────────────────────┐
[0] │ npm update check failed │
[0] │ Try running with sudo or get access │
[0] │ to the local update config store via │
[0] │ sudo chown -R $USER:$(id -gn $USER) C:\Users\ADMIN\.config │
[0] └────────────────────────────────────────────────────────────┘
[1]
[1] > client@0.1.0 start C:\Users\ADMIN\Desktop\boilerplate-mern-stack-master\boilerplate-mern-stack-master\client
[1] > react-scripts start
[1]
[0]
[0] > react-boiler-plate@1.0.0 backend C:\Users\ADMIN\Desktop\boilerplate-mern-stack-master\boilerplate-mern-stack-master
[0] > nodemon server/index.js
[0]
[0] [nodemon] 1.19.4
[0] [nodemon] to restart at any time, enter `rs`
[0] [nodemon] watching dir(s): *.*
[0] [nodemon] watching extensions: js,mjs,json
[0] [nodemon] starting `node server/index.js`
[0] C:\Users\ADMIN\Desktop\boilerplate-mern-stack-master\boilerplate-mern-stack-master\server\index.js:41
[0] app.post('/api/product/image', ko);
[0] ^
[0]
[0] ReferenceError: ko is not defined
[0] at Object.<anonymous> (C:\Users\ADMIN\Desktop\boilerplate-mern-stack-master\boilerplate-mern-stack-master\server\index.js:41:32)
[0] at Module._compile (internal/modules/cjs/loader.js:1063:30)
[0] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
[0] at Module.load (internal/modules/cjs/loader.js:928:32)
[0] at Function.Module._load (internal/modules/cjs/loader.js:769:14)
[0] at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
[0] at internal/main/run_main_module.js:17:47
[0] [nodemon] app crashed - waiting for file changes before starting...
[1] [HPM] Proxy created: / -> http://localhost:5000
[1] i 「wds」: Project is running at http://192.168.0.4/
[1] i 「wds」: webpack output is served from
[1] i 「wds」: Content not from webpack is served from C:\Users\ADMIN\Desktop\boilerplate-mern-stack-master\boilerplate-mern-stack-master\client\public
[1] i 「wds」: 404s will fallback to /
[1] Starting the development server...
[1]
[1] Browserslist: caniuse-lite is outdated. Please run:
[1] npx browserslist@latest --update-db
[1] Compiled with warnings.
[1]
[1] ./src/components/views/UploadProductPage/UploadProductPage.js
[1] Line 2:9: 'Typography' is defined but never used no-unused-vars
[1] Line 24:12: 'Images' is assigned a value but never used no-unused-vars
[1] Line 24:20: 'setImages' is assigned a value but never used no-unused-vars
[1]
[1] ./src/components/utils/FileUpload.js
[1] Line 52:21: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
[1] Line 53:30: Unexpected template string expression no-template-curly-in-string
[1]
[1] ./src/components/views/LoginPage/LoginPage.js
[1] Line 74:11: 'dirty' is assigned a value but never used no-unused-vars
[1] Line 79:11: 'handleReset' is assigned a value but never used no-unused-vars
[1]
[1] ./src/components/views/RegisterPage/RegisterPage.js
[1] Line 92:11: 'dirty' is assigned a value but never used no-unused-vars
[1] Line 97:11: 'handleReset' is assigned a value but never used no-unused-vars
[1]
[1] Search for the keywords to learn more about each warning.
[1] To ignore, add // eslint-disable-next-line to the line before.
[1]
[1] [HPM] Error occurred while trying to proxy request /api/users/auth from localhost:3000 to http://localhost:5000 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
npm run dev 입력 후 나오는 설명들 복사 붙여넣기 했습니다.
답변 2
0
0
안녕하세요 notbackdown님
에러 로그를 보니깐
app.post('/api/product/image', ko);
여기서 에러가 난다고 나옵니다. 저기에 ko는 어떤걸 넣으신거죠 ?!
저기 ko에서 에러가 나고 있습니다 ~!