에러를 맞았을 때
vue npm run build시 cannot find module (vue-cli-service)
_zeje
2022. 2. 16. 16:30
반응형
(base) ☁ floatedshop [main] ⚡ npm run build
> floatedshop@0.1.0 build
> vue-cli-service build
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '../package.json'
Require stack:
- /Users/user/Desktop/9/works_2022/floatedshop_fullstack/floatedshop/node_modules/.bin/vue-cli-service
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/user/Desktop/9/works_2022/floatedshop_fullstack/floatedshop/node_modules/.bin/vue-cli-service:4:25)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/user/Desktop/9/works_2022/floatedshop_fullstack/floatedshop/node_modules/.bin/vue-cli-service'
]
}
아니 이놈의 시끼는 프로젝트 생성하고 빌드 할때마다 에러를 뱉네..
하여튼 해결방법이 이렇게 했을 때 됐다가 또 하면 안됐다가.. 다른 거 할 때 됐다가 또 하면 안됐다가 해서
된 걸 다 적어보자면..
1. npm uninstall vue-cil -g
2. npm i
3. npm install -g @vue/cli
4. 터미널 끄고 재실행 후 npm run build
1. 프론트 (vue) 프로젝트 내부 node_modules 삭제
2.npm install
3. 터미널 끄고 다시 킨 다음 npm run build
넘 열받앙!
반응형