Skip to content

Comments

#5 - Fix infinite hanging frontend:dev Wails command#6

Open
Insulince wants to merge 1 commit intoTAINCER:masterfrom
Insulince:master
Open

#5 - Fix infinite hanging frontend:dev Wails command#6
Insulince wants to merge 1 commit intoTAINCER:masterfrom
Insulince:master

Conversation

@Insulince
Copy link

Closes #5

  • Fix an issue with frontend:dev Wails command running an npm command which never exits.

So, the initial closed pipe error appears to be because npm install was never run after pulling a fresh instance of the template, so attempting to ng build would error out. And this error isn't propagated, hence the cryptic message about the pipe closing.

Running npm install fixes the pipe error, however, it then runs into another issue which is that Wails hangs forever while it states it's attempting to install front-end dependencies. It isn't installing dependencies, it's running npm run watch which runs ng build --watch .... Because of the --watch flag, it hangs forever since this command never exits.

The fix for this was to simply add a new npm command called build:dev for doing a one-off build identical to the watch command except without the --watch flag so that it eventually terminates and allows the program to proceed, and assign it to the Wails command frontend:dev, then move the npm run watch command to the Wails command frontend:dev:watcher. After these changes my issues have gone away and things like hot reloading appear to be operating just fine.

I will say though, that it is still important that somehow it be communicated that npm install needs to be run to avoid the pipe error on a fresh instance of the template. Though installing dependencies is a pretty standard requirement after pulling a fresh front-end project, perhaps it's not that huge of a deal.

Copy link

@marcio199226 marcio199226 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definitely resolve the issue

@LeonardoWiest
Copy link

This solves the problem

@Ecsodikas
Copy link

Pretty sure this solves the issue

@TeeB3utel
Copy link

I'm quite confident this resolves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wails dev results in a read/write on closed pipe error during front end dependency installation

6 participants