GithubHelp home page GithubHelp logo

Comments (11)

malept avatar malept commented on August 28, 2024 2

Yeah, don't install electron directly onto the project. electron is a dependency of electron-prebuilt-compile (which is installed by default), but it does not install electron into the top-level node_modules (because of installation conflicts). What you're seeing with the red squiggle sounds like a VSCode bug.

from forge.

deepak avatar deepak commented on August 28, 2024 1

@MarshallOfSound it worked after

  1. reinstalling node
  2. installing electron-forge in global
  3. npm installing dependencies

from forge.

MarshallOfSound avatar MarshallOfSound commented on August 28, 2024

But it randomly stopped working on Windows 10

Nothing happens randomly, you probably deleted the .compilerc by accident or corrupted your node_modules directory or something similar. On a fresh clone your repository I do not encounter this error so I can only assume that something has broken in your local.

Perhaps one of the issues mentioned above, perhaps not. You should try resetting your local dev environment.

from forge.

deepak avatar deepak commented on August 28, 2024

Nothing happens randomly, you probably deleted the .compilerc by accident

I do not know even where the .compilerc file is. so am assuming did not delete it
where is the .compilerc file on windows and OSX ?

By random, i meant that it was working before and then stopped working
Can i request a electro-forge doctor command to check the dependencies

I tried after reinstalling electron-forge as well with "npm install -g electron-forge"

from forge.

MarshallOfSound avatar MarshallOfSound commented on August 28, 2024

If electron-forge start get's passed the "Locating application" phase we believe the required config is there. This does not mean that you have everything installed correctly however.

Try completely recloning your repository, who knows what could have been deleted / edited / broken.

from forge.

deepak avatar deepak commented on August 28, 2024

thanks @MarshallOfSound. will try it out

from forge.

deepak avatar deepak commented on August 28, 2024

If electron-forge start get's passed the "Locating application"
phase we believe the required config is there

in my case the application is starting up but the above error is thrown
and this happens only on windows. application starts and works on OSX

there was a separate error on OSX
due to hard disk getting full. but there was no such issue on windows. ie. hard disk was not full etc
so not sure why this error is occurring

so i suggested a "homebrew doctor" command
so check all the dependencies

even a list of manual steps to check the system would be nice to have
re-installing the whole system (in case it stops working) does seems painful

from forge.

MarshallOfSound avatar MarshallOfSound commented on August 28, 2024

@deepak I'm not sure what to tell you, I cloned your repository onto a Windows 10 machine and ran yarn followed by electron-forge start. It worked perfectly.

Whatever error you are getting appears to be due to the compiler not kicking in which normally occurs due to a misconfigured .compilerc.

As such the best I can suggest (as I said before) is effectively recloning your repository and starting the same way I did. If the error still occurs on a clean clone of your repository on your machine I can potentially look into more debugging

from forge.

krimark avatar krimark commented on August 28, 2024

Same error here but the steps described by deepak above does not help in my case.

from forge.

malept avatar malept commented on August 28, 2024

@krimark do you have a minimal, sample app that we can use to reproduce?

from forge.

krimark avatar krimark commented on August 28, 2024

Hi, what I do is to simply initialize a new projekt using the angular 2 template from here: https://beta.electronforge.io/templates and I also add electron to the dev dependencies with npm install electron --save-dev because otherwise I get red squiggles in VS Code on the line import { app, BrowserWindow } from 'electron'; If I just run the code without first installing electron it seems to work but I don't understand why as electron is not present in node_modules at that time.

electron_test

from forge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.