-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
Uncaught Error: Cannot find module 'electron-compile/lib/initialize-renderer' #619
Comments
Why are you running I cannot reproduce this with Electron Forge 5.2.2: npx --no-install --ignore-existing electron-forge init test
cd test
npm start (If you don't have |
Since the original issue reporter has not responded to the request for additional information in about a week, I'm going to assume that they either found the answer in another manner or decided not to pursue this issue. If I'm incorrect, they can respond with answers to the questions posed, and I'll reopen. |
Hiya, Win7 x64 The init has no error on start
I copy over my fav project, just the src folder only. Needing modules like jquery and highcharts.
And now I have this error in the debug window:
When moving to a different older dev machine, such as I did in this case, I ran the usual updates for the init. Then I copy my usual src folder to new project init to ensure the latest package.json. This error doesn't exist on my Windows 10 laptop with this same update and init and src copy procedure as of a few weeks ago, so im kinda miffed. |
Definitely don't do that. That doesn't do anything for an Electron app project. Is |
Hi Malept, |
It is installed on
|
No 100% not deleted.
I'll do a compare as it is somewhere between init and installing modules.
…On Tue, Feb 5, 2019 at 12:52 PM Mark Lee ***@***.***> wrote:
Why isn't it installed on forge init ??
It is installed on init
<https://github.com/electron-userland/electron-forge/blob/40923b8b775b740e99bf8d56c66535c92819766d/src/init/init-npm.js#L13>.
I suspect it might have been accidentally deleted somewhere around
I copy over my fav project
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#619 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGuzRxCp1tcMuj_SP3hyZONDmAZWz9ckks5vKMejgaJpZM4YRM7f>
.
|
If you can provide a detailed (but minimal) set of reproducible instructions to get to the state where you have a Forge v5 project without |
Got the error with no file changes:
|
What version of NPM is this? |
I cannot reproduce this on Linux (Debian Stretch):
|
No probs, easy enough to fix, might just be this system setup. |
I used electron forge about 2 weeks ago and did not have as much trouble as I am getting now. This issue seems to be related to me doing an import with a relative path and electron forge chokes on resolving it. I followed the instructions from the web site to install and run electron. Love the page of warning and errors. Last week I had 4 which I dealt but this speghetti...
Now to reproduce the error.. alter src/index.html like so
Then make folder named "js" and in that put this script:
Then we create the utils script test.js is importing. Make a folder "utils" and put this file in it:
When I save all and run the example in a server ( Using http-server npm module "http-server ./ -p 8080") HOWEVER when I continue with the Electron Forge documentation and run "npm start" I get: And don't even get me started with the make errors I'm getting. About a week ago I ran some tests with electron forge to see if it was good for my project. It worked well enough maybe 4 errors to fix. Better than the rest I found. Now today. Can't reproduce that success but I can reproduce this Error. |
I can get everything working if I change the extensions on the file to .mjs and use the npx install instructions for electron-forge. Using the .js causes the problem. I was going to use .js to get the intellisense from vscode. A sore spot to be sure. Can't say typescript is a superset of javascript if the tool doesn't extend the core js. I'm fine with electron-forge's behavior in this point. |
I am still getting this, @clintmulligan would you mind detailing exactly what you did as I am losing my mind on this: |
First I follow the installation instructions of electron-forge that use npx.
The error stems from me trying to do a relative import in the javascript.
(../folder/file.js).
In a normal node server the import works. But breaks with electron-compule
that is handling the transpiring of es6 (javascript version e everyone
should be using now, it's been 4 years (rant)) to earlier.
If I change the file extensions from .js to .mjs, which is the file
extension for es6 javascript modules then it works.
Which I found upsetting because vs cir intellisense doesn't work with .mjs
extensions (thinking the devs are pushing typescript hard).
Anyways try changing your file extensions to .mjs if you are using relative
imports. Think that's what I remember.
…On Wed, Jun 12, 2019, 9:01 AM tokensalad ***@***.***> wrote:
I am still getting this, @clintmulligan <https://github.com/ClintMulligan>
would you mind detailing exactly what you did as I am losing my mind on
this:
Node v10.13.0
npm v6.4.1
electron-forge 5.2.4
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#619>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADAUVX2LCKMT4QI42RJMGXLP2DXSVANCNFSM4GCEZ3PQ>
.
|
I really appreciate you getting back to me so quickly. I did try that but with no success (I'm pretty sure that the problem is as you describe, as the event called via the import fails as 'undefined'). Again, rally appreciate you taking the time to respond. |
At this point in time, I'd suggest using Electron Forge v6 + the webpack template, instead of the electron-compile ecosystem. |
Node 10.9.0
NPM 6.4.1
electron-forge 5.2.2
macOS Mojave
Steps to reproduce:
Open the console once the window appears to see the error:
I can fix it by running
npm install electron-compile
in the project.The text was updated successfully, but these errors were encountered: