-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot able to find module 'electron-log' #91
Comments
I have checked Dependencies in Package.json, It was there but still i cant able to find the issue. Thanks in Advance. |
How do you import the package? Do you use webpack? |
I had installed through NPM |
Please provide more details |
Acctually its a Angular web application , i just used electron to Convert it as a Windows Application, Then I am Working to Implement Auto Updater, then i build the App when I tried to Open the app , i am getting the Above mentioned error. |
There are a lot of reasons why the module may be installed incorrectly. I need to see package.json and webpack config to find a reason. |
const { app, BrowserWindow, Menu, protocol, ipcMain } = require('electron'); // Keep a global reference of the window object, if you don't, the window will const createWindow = () => {
} // This method will be called when Electron has finished // Quit when all windows are closed. app.on('activate', () => { // const updater = require('electron-simple-updater'); //------------------------------------------------------------------- //------------------------------------------------------------------- //------------------------------------------------------------------- function sendStatusToWindow(text) { createDefaultWindow(); //------------------------------------------------------------------- app.on('ready', function() { |
The Above Code is from Main Process File.. |
{ This is my Package.Json file |
It seems ok. What's your build script? |
Build Script? tell me exactly where i need to get that |
How do you build the app? |
"scripts": {
"ng": "ng",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"start": "concurrently \"ng serve\" \"npm run electron\"",
"electron": "electron ./src/electron.dev",
"package:win": "npm run build && cross-var electron-packager dist $npm_package_name-$npm_package_version --out=packages --platform=win32 --arch=all --overwrite ",
"setup": "electron-installer-windows --src packages/testone-0.0.0-win32-ia32/ --dest dist/installers/"
} |
electron-packager can skip modules from devDependencies. So try to remove electron-log from package.json:devDependencies section. |
need to be removed before building the app? |
Just remove it forever. I recommend you to keep only electron, electron-builder and may be http-server |
I just removed from devDependencies and I build the app, Same issue occurs |
It seems that your problem is related to PKief/angular-cli-electron#5 I don't know exactly how to fix it because I don't know Angular 2+ and what it exactly generates inside dist folder. I can assume, that there is dist/package.json which doesn't contains modules from the main package.json. So you can try to fix build script (package:win) to copy the /package.json (or dependency part of it) to /dist/package.json before calling electron-packager |
Try v3.0.0-beta2. Feel free to reopen if the problem isn't fixed. |
Moved electron-log to dependancies rather than devDependancies worked for me. Electron includes this module when building exe app |
I am having the same error guys, I deleted the electron-log devDependencies yet the problem occurs again |
Is there anyone resolve the error ? |
There are a lot of reasons why the module couldn't be resolved. In most cases it's a wrong bundler configuration. |
I have the same error in an Electron Vue app. The same problem happens with the package electron-fetch, so maybe it is because the package name starts with "electron-" and is exlcuded by webpack somehow. The changes in this commit show a minimal change triggering this error: |
@robido the electron-vue-bolierplate contains |
The text was updated successfully, but these errors were encountered: