npx webpack 오류
814
작성한 질문수 11
npx webpack 명령어를 쳤더니
$ npx webpack
[webpack-cli] Failed to load 'C:\Users\ws\Desktop\sleact\alecture\webpack.config.ts' config
[webpack-cli] Error: Debug Failure. False expression: Non-string value passed to ts.resolveTypeReferenceDirective, likely by a wrapping package working with an outdated resolveTypeReferenceDirectives signature. This is probably not a problem in TS itself.
at Object.resolveTypeReferenceDirective (C:\Users\ws\Desktop\sleact\alecture\node_modules\typescript\lib\typescript.js:43192:18)
at C:\Users\ws\Desktop\sleact\alecture\node_modules\ts-node\src\index.ts:623:55
at Array.map (<anonymous>)
at Object.resolveTypeReferenceDirectives (C:\Users\ws\Desktop\sleact\alecture\node_modules\ts-node\src\index.ts:622:33)
at actualResolveTypeReferenceDirectiveNamesWorker (C:\Users\ws\Desktop\sleact\alecture\node_modules\typescript\lib\typescript.js:118205:163)
at resolveTypeReferenceDirectiveNamesWorker (C:\Users\ws\Desktop\sleact\alecture\node_modules\typescript\lib\typescript.js:118505:26)
at processTypeReferenceDirectives (C:\Users\ws\Desktop\sleact\alecture\node_modules\typescript\lib\typescript.js:120002:31)
at findSourceFileWorker (C:\Users\ws\Desktop\sleact\alecture\node_modules\typescript\lib\typescript.js:119887:21)
at findSourceFile (C:\Users\ws\Desktop\sleact\alecture\node_modules\typescript\lib\typescript.js:119739:26)
at C:\Users\ws\Desktop\sleact\alecture\node_modules\typescript\lib\typescript.js:119688:85
이런 오류가 나오는데요.. 오류 해결법을 몰라서 깃허브에 있는 코드를 복사 붙여넣기 했는데도 오류가 뜹니다. ㅠㅠ
답변 1
0
npm i typescript@latest ts-node@latest 해보세요.
0
강의 처음부터 다시 듣고 하고있는데요 이젠 이렇게 뜹니다.
$ npm run build
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\ws\Desktop\sleact\alecture/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\ws\Desktop\sleact\alecture\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ws\AppData\Local\npm-cache\_logs\2022-09-06T03_35_49_104Z-debug-0.log
0
tsconfig.json에 compilerOptions 아래에 다음 코드 추가하시고
"compilerOptions": {...},
"ts-node": {
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "Node",
"target": "es5",
"esModuleInterop": true
}
}package.json에서 scripts -> build는 "cross-env NODE_ENV=production webpack"로 하신 후
npm run build 해보세요.
0
잠깐 봤는데 node_modules 폴더 안에 package.json이 있으면 안 되고, node_modules랑 같은 위치에 package.json이 있어야 합니다.
기본 셋팅과 관련하여
0
92
1
초기 셋팅 back과 front만 남겨두고 다 지운 후 진행 방법
0
96
2
focus 시에만 화면 업데이트 되는 이유 + 해결방법
0
150
2
useEffect 개수 관리
0
110
2
라이브러리 서치 방법
0
104
2
함수 정의 패턴
0
77
1
npm run dev 에러
0
152
3
npx webpack 후 에러
0
178
2
'void' 형식 식의 truthiness를 테스트할 수 없습니다.ts(1345)
0
144
2
사용자 가입시 에러발생 (TypeError: Cannot read properties of null (reading 'addMembers')
1
178
2
초기세팅중 packge.json 에러떠요
0
156
2
CORS - Access-Control-Allow-Origin 누락 문제
0
431
3
로그인 페이지 무한 새로고침 현상
0
598
2
Module not found: Error: Can't resolve './App' 에러
0
959
1
배포 방법
0
297
2
npm run dev 시 빌드가 매우 느려졌습니다
0
990
2
alias 경로 설정 오류
0
451
2
fetcher 함수의 data 값이 두번 찍히는 이유
0
277
1
제네릭 질문
0
218
2
ts-node 대신 tsx 사용여부
0
373
1
배포 관련 질문
0
247
1
[nginx + https] 서비스를 실행하면 niginx가 아닌 서비스 화면을 보여주게 하고 싶습니다.
0
385
2
[배포하기] webpack에 aws 퍼블릭 IPv4 주소 와 포트 주소를 작성하고 나서 빌드후 실행하면 오류가 발생합니다.
0
336
1
users 호출 시 쿠키가 담기지 않는 이슈 질문드립니다.
0
247
2





