ERROR in ./node_modules/enhanced-resolve/lib/ResolverFactory.js 118:9-26
Module not found: Error: Can't resolve 'pnpapi' in 'C:\Users\david\Projects\electron-react @ ./node_modules/enhanced-resolve/lib/index.js 10:24-52
@ ./node_modules/webpack/lib/ResolverFactory.js 8:16-59
@ ./node_modules/webpack/lib/Compiler.js 25:24-52
@ ./node_modules/webpack/lib/index.js 114:9-30
@ ./src/js/App.js 2:0-35
@ ./src/js/index.js 3:0-24 5:50-53
{
"name": "electron-react",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "webpack --config webpack.common.js --watch",
"start": "electron ."
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"electron": "^10.1.5",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.5",
"babel-loader": "^8.2.1",
"css-loader": "^5.0.1",
"electron-reload": "^1.5.0",
"sass": "^1.29.0",
"sass-loader": "^10.1.0",
"style-loader": "^2.0.0",
"webpack": "^5.4.0",
"webpack-cli": "^4.2.0"
}
}
From what I've heard, pnpapi is built into webpack now, and that might be causing some conflict? I commented out line 118 in lib/ResolverFactory.js and webpack compiles fine after that.
Here's my package.json as well
From what I've heard, pnpapi is built into webpack now, and that might be causing some conflict? I commented out line 118 in lib/ResolverFactory.js and webpack compiles fine after that.