1. 상황 1
1) npm install -g webpack 을 설치 했다.
2) webpack을 하는데 안된다. 아래와 같은 에러 발생시
PS C:\web-project\book-mark> webpack
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (C:\web-project\book-mark\webpack.config.js:2:15)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
PS C:\web-project\book-mark> npm link webpack
해결 방법
- npm link webpack
https://stackoverflow.com/questions/29492240/error-cannot-find-module-webpack
'ProgrammingLang > typescript' 카테고리의 다른 글
[typescript] 9. class 상속과 포함 관계 (0) | 2019.05.01 |
---|---|
[typescript] 8. class 와 instance (0) | 2019.05.01 |
[typescript] 7. 함수 (선언적 함수, 익명 함수, 콜백 함수) (0) | 2018.12.06 |
[typescript] 6. 연산자 와 디스트럭쳐링(destructuring) (0) | 2018.12.05 |
[typescript] 5. 제어문 (0) | 2018.12.05 |