ERROR in ./node_modules/request/lib/har.js
Module not found: Error: Can't resolve 'fs' in 'D:\frontEnd\node_modules\request\lib'
@ ./node_modules/request/lib/har.js 3:9-22
@ ./node_modules/request/request.js
@ ./node_modules/request/index.js
@ ./src/GithubApiService.ts
@ ./src/index.tsERROR in ./node_modules/forever-agent/index.js
Module not found: Error: Can't resolve 'tls' in 'D:\frontEnd\node_modules\forever-agent'
@ ./node_modules/forever-agent/index.js 7:10-24
@ ./node_modules/request/request.js
@ ./node_modules/request/index.js
@ ./src/GithubApiService.ts
@ ./src/index.tsERROR in ./node_modules/tunnel-agent/index.js
Module not found: Error: Can't resolve 'tls' in 'D:\frontEnd\node_modules\tunnel-agent'
@ ./node_modules/tunnel-agent/index.js 4:10-24
@ ./node_modules/request/lib/tunnel.js
@ ./node_modules/request/request.js
@ ./node_modules/request/index.js
@ ./src/GithubApiService.ts
@ ./src/index.ts
i 「wdm」: Failed to compile.
Scenario 1, if can not resolve 'xxxx' to install npm install 'xxx' is like, first uninstall the component npm uninstall 'xxx', then npm install 'xxx', or delete all folders again npm install node_modules
Scenario 2 If the on-fs, tls, net and other components Cant resolve the situation, the installed packages are installed but still error, you can try to add the file in webpack.config.js
node: {
fs: 'empty',
net:'empty',
tls:"empty",
}