npm start 시 오류가 납니다.
4752
작성한 질문수 11
root@ip-172-31-43-165:/home/ubuntu/react_nodebird/back# npm start
> react-nodebird-back@1.0.0 start /home/ubuntu/react_nodebird/back
> node app
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module './dialects/mysql/data-types'
Require stack:
- /home/ubuntu/react_nodebird/back/node_modules/sequelize/dist/lib/data-types.js
- /home/ubuntu/react_nodebird/back/node_modules/sequelize/dist/lib/utils.js
- /home/ubuntu/react_nodebird/back/node_modules/sequelize/dist/lib/sequelize.js
- /home/ubuntu/react_nodebird/back/node_modules/sequelize/dist/index.js
- /home/ubuntu/react_nodebird/back/models/index.js
- /home/ubuntu/react_nodebird/back/routes/post.js
- /home/ubuntu/react_nodebird/back/app.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/home/ubuntu/react_nodebird/back/node_modules/sequelize/dist/lib/data-types.js:648:20)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/ubuntu/react_nodebird/back/node_modules/sequelize/dist/lib/data-types.js',
'/home/ubuntu/react_nodebird/back/node_modules/sequelize/dist/lib/utils.js',
'/home/ubuntu/react_nodebird/back/node_modules/sequelize/dist/lib/sequelize.js',
'/home/ubuntu/react_nodebird/back/node_modules/sequelize/dist/index.js',
'/home/ubuntu/react_nodebird/back/models/index.js',
'/home/ubuntu/react_nodebird/back/routes/post.js',
'/home/ubuntu/react_nodebird/back/app.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-nodebird-back@1.0.0 start: `node app`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-nodebird-back@1.0.0 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! /root/.npm/_logs/2022-02-16T13_55_05_438Z-debug.log
--------------------------
데이터타입을 못 찾는다길래 models 파일들 상단에 있는
이 부분이 잘못 됐나 해서
시퀄라이즈랑 시퀄라이즈-cli도 다시 설치했는데
안돼서 다른 문제인 듯 싶은데 도저히 모르겠네요ㅠㅠ
답변 1
0
rm -rf node_modules package-lock.json
으로 통째로 다 지우고
npm i 다시 해보세요.
0
ubuntu@ip-172-31-43-165:~/react_nodebird/back$ rm -rf node_modules package-lock.json
ubuntu@ip-172-31-43-165:~/react_nodebird/back$ npm i
npm ERR! code EINVALIDTYPE
npm ERR! typeerror Error: Argument #2: Expected string but got null
npm ERR! typeerror at exports.findRequirement (/usr/lib/node_modules/npm/lib/install/deps.js:756:3)
npm ERR! typeerror at findChild (/usr/lib/node_modules/npm/lib/install/deps.js:125:17)
npm ERR! typeerror at computeMetadata (/usr/lib/node_modules/npm/lib/install/deps.js:135:9)
npm ERR! typeerror at Installer.normalizeCurrentTree (/usr/lib/node_modules/npm/lib/install.js:414:3)
npm ERR! typeerror at Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
npm ERR! typeerror at LOOP (/usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
npm ERR! typeerror at /usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
npm ERR! typeerror at /usr/lib/node_modules/npm/lib/install.js:368:5
npm ERR! typeerror at /usr/lib/node_modules/npm/node_modules/iferr/iferr.js:3:64
npm ERR! typeerror at asyncMap (/usr/lib/node_modules/npm/node_modules/slide/lib/async-map.js:27:18)
npm ERR! typeerror at exports.getAllMetadata (/usr/lib/node_modules/npm/lib/install/deps.js:228:3)
npm ERR! typeerror at Installer.loadArgMetadata (/usr/lib/node_modules/npm/lib/install.js:366:3)
npm ERR! typeerror at /usr/lib/node_modules/npm/lib/install.js:704:16
npm ERR! typeerror at /usr/lib/node_modules/npm/lib/install/read-shrinkwrap.js:33:16
npm ERR! typeerror at tryCatcher (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
npm ERR! typeerror at Promise._settlePromiseFromHandler (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:517:31)
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2022-02-17T05_22_16_333Z-debug.log
npm i 하니까 오류 나네요ㅠㅠㅠ...
0
다 삭제하고 다시 클론해서 설치하니 저 문제는 사라졌습니다!
그러나 다른 문제가 발생했습니다...
root@ip-172-31-43-165:/home/ubuntu/react_nodebird/back# npm i
> bcrypt@5.0.1 install /home/ubuntu/react_nodebird/back/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Pre-built binaries not installable for bcrypt@5.0.1 and node@14.19.0 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/home/ubuntu/react_nodebird/back/node_modules/bcrypt/lib'
gyp WARN EACCES current user ("ubuntu") does not have permission to access the dev dir "/root/.cache/node-gyp/14.19.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/ubuntu/react_nodebird/back/node_modules/bcrypt/.node-gyp"gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ubuntu/react_nodebird/back/node_modules/bcrypt/.node-gyp'
gyp ERR! System Linux 5.4.0-1060-aws
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/ubuntu/react_nodebird/back/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/home/ubuntu/react_nodebird/back/node_modules/bcrypt/lib/binding/napi-v3" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /home/ubuntu/react_nodebird/back/node_modules/bcrypt
gyp ERR! node -v v14.19.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
configure --fallback-to-build --module=/home/ubuntu/react_nodebird/back/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node
--module_name=bcrypt_lib --module_path=/home/ubuntu/react_nodebird/back/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/ubuntu/react_nodebird/back/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1058:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
node-pre-gyp ERR! System Linux 5.4.0-1060-aws
node-pre-gyp ERR! command "/usr/bin/node" "/home/ubuntu/react_nodebird/back/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/ubuntu/react_nodebird/back/node_modules/bcrypt
node-pre-gyp ERR! node -v v14.19.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.8
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/ubuntu/react_nodebird/back/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/ubuntu/react_nodebird/back/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN react-nodebird-back@1.0.0 No description
npm WARN react-nodebird-back@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@5.0.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@5.0.1 install 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! /root/.npm/_logs/2022-02-17T06_50_09_648Z-debug.log
넥스트 버젼 질문
0
90
2
로그인시 401 Unauthorized 오류가 뜹니다
0
104
1
무한 스크롤 중 스크롤 튐 현상
0
192
1
특정 페이지 접근을 막고 싶을 때
0
116
2
createGlobalStyle의 위치와 영향범위
0
102
2
인라인 스타일 리렌더링 관련
0
97
2
vsc 에서 npm init 설치시 오류
0
157
2
nextjs 15버전 사용 가능할까요?
0
166
1
화면 새로고침 문의
0
129
1
RTK에서 draft, state 차이가 있나요?
0
160
2
Next 14 사용해도 될까요?
0
455
1
next, node 버전 / 폴더 구조 질문 드립니다.
0
359
1
url 오류 질문있습니다
0
214
1
ssh xxxxx로 우분투에 들어가려니까 port 22: Connection timed out
0
391
1
sudo certbot --nginx 에러
0
1293
2
Minified React error 콘솔에러 (hydrate)
0
477
1
카카오 공유했을 때 이전에 작성했던 글이 나오는 버그
0
255
1
프론트서버 배포 후 EADDRINUSE에러 발생
0
337
1
npm run build 에러
0
525
1
front 서버 npm run build 중에 발생한 에러들
0
399
1
서버 실행하고 브라우저로 들어갔을때 404에러
0
350
2
css 서버사이드 랜더링이 적용되지 않아서 문의 드립니다.
0
290
1
팔로워 3명씩 불러오고 데이터 합쳐주는걸로 바꾸고 서버요청을 무한으로하고있습니다.
0
249
2
해시태그 검색에서 throttle에 관해 질문있습니다.
0
206
1





