Frontend/react
-
[HMR] bundle has 1 warningsclient.js?f33d:189 ./node_modules/moment/src/lib/locale/locales.jsModule not found: Error: Can't resolve './locale' in '/.../node_modules/moment/src/lib/locale'Frontend/react 2020. 1. 7. 13:09
Error: [HMR] bundle has 1 warningsclient.js?f33d:189 ./node_modules/moment/src/lib/locale/locales.jsModule not found: Error: Can't resolve './locale' in '/.../node_modules/moment/src/lib/locale' Solution: npm install --save moment npm install --save-dev moment-locales-webpack-plugin // webpack.config.js const MomentLocalesPlugin = require('moment-locales-webpack-plugin'); module.exports = { plug..
-
ERROR in ./node_modules/request/lib/har.jsModule not found: Error: Can't resolve 'fs' in '.../node_modules/request/lib'Frontend/react 2020. 1. 7. 12:17
ERROR in ./node_modules/request/lib/har.js Module not found: Error: Can't resolve 'fs' in '/.../node_modules/request/lib' add webpack config : node: { fs: 'empty', },
-
React 프로젝트 생성하기Frontend/react 2020. 1. 6. 15:31
리엑트 글로벌 패키지 설치 npm install -g create-react-app 프로젝트 생성 create-react-app [프로젝트명] 생성 완료 babel, webpack 등 dependency package들은 ./node_modules/react-scripts 에 설치 되어 package.json엔 보이지 않는다. // package.json { "name": "", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", "react": "^16..