nathanbuchar / electron-settings

📝 A simple persistent user settings framework for Electron.
https://electron-settings.js.org
MIT License
814 stars 60 forks source link

Missing dependencies in package.json #147

Closed eddietisma closed 3 years ago

eddietisma commented 3 years ago

I'm having some dependency issues with webpack.

ERROR in ./node_modules/electron-settings/dist/settings.js 53:27-40
Module not found: Error: Can't resolve 'fs' in 'C:\ws\electron-app\node_modules\electron-settings\dist'
 @ ./src/app/app.config.ts 7:42-70
 @ ./src/main.ts 40:19-45
ERROR in ./node_modules/electron-settings/dist/settings.js 55:29-44
Module not found: Error: Can't resolve 'path' in 'C:\ws\electron-app\node_modules\electron-settings\dist'

I might have done something wrong on my side... But shouldn't fs and path be included in your package.json?

eddietisma commented 3 years ago

My mistake. Fixed by adding target: 'node' in webpack.config. Also, these modules are already included in node-js.