Why do I get a Can not find module error when I run npx run dev?
before run 'npx run dev'
I processed this
Run the npm init command Webpack webpack-cli installation Configuring webpack.conifig.js Setting package.json node upgrade Creating client.jsx WordRelay.jsx component file creation etc.
webpack.conifig.js
const path = require('path');
module.exports = {
name:'wordrelay-setting',
mode:'development',
devtool:'eval',
resolve:{
extensions:['.js','.jsx']
},
entry:{
app:['./client']
}, // 입력
output: {
path:path.join(__dirname,'dist'),
filename:'app.js'
}, // 출력
};
package.json
{
"name": "lecture",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "webpack"
},
"author": "hyun",
"license": "ISC",
"dependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
"devDependencies": {
"webpack": "^4.37.0",
"webpack-cli": "^3.3.6"
}
}
and github: https://github.com/hyunsokstar/react_game_prac2