작성
·
945
0
[webpack-cli] Failed to load '/Users/ohyunseok/Documents/PROJECT/Slacku/react-frontend/webpack.config.ts' config
[webpack-cli] webpack.config.ts:1:8 - error TS1259: Module '"path"' can only be default-imported using the 'esModuleInterop' flag
1 import path from 'path';
~~~~
node_modules/@types/node/path.d.ts:162:5
162 export = path;
~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
webpack.config.ts:1:8 - error TS1259: Module '"path"' can only be default-imported using the 'esModuleInterop' flag
1 import path from 'path';
~~~~
node_modules/@types/node/path.d.ts:162:5
162 export = path;
~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
webpack.config.ts:3:8 - error TS1259: Module '"/Users/ohyunseok/Documents/PROJECT/Slacku/react-frontend/node_modules/webpack/types"' can only be default-imported using the 'esModuleInterop' flag
3 import webpack, { Configuration as WebpackConfiguration } from 'webpack';
~~~~~~~
node_modules/webpack/types.d.ts:12245:1
12245 export = exports;
~~~~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
error Command failed with exit code 2.
답변 5
0
0
App.tsx:12 Uncaught ReferenceError: $RefreshReg$ is not defined
at Object../layouts/App.tsx (App.tsx:12)
at __webpack_require__ (bootstrap:19)
at app.js:29889
at app.js:29894
at app.js:29895
./layouts/App.tsx @ App.tsx:12
__webpack_require__ @ bootstrap:19
(anonymous) @ app.js:29889
(anonymous) @ app.js:29894
(anonymous) @ app.js:29895
index.html:73
0
0
0
webpack.config.ts 문제입니다