Closed Ucag closed 3 years ago
I'm working with vue and electron. Everything goes fine in development, however, when it comes to package my app this error occurred.
Cannot find module 'electron-settings'
I double checked that electron-settings is right in my package.json dependencies field. I require it like this
electron-settings
dependencies
const settings = window.require('electron-settings')
I also have tried:
const settings = remote.require('electron-settings')
But not working....
This is my package.json
"dependencies": { "core-js": "^3.6.5", "electron-settings": "^4.0.2", "raw-loader": "^4.0.2", "vue": "^2.6.11" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-service": "~4.5.0", "electron": "^9.0.0", "electron-devtools-installer": "^3.1.0", "vue-cli-plugin-electron-builder": "~2.0.0-rc.5", "vue-template-compiler": "^2.6.11" }
Same, using electron-forge. What did you do to fix?
I'm working with vue and electron. Everything goes fine in development, however, when it comes to package my app this error occurred.
I double checked that
electron-settings
is right in my package.jsondependencies
field. I require it like thisI also have tried:
But not working....
This is my package.json