BenjaminDobler / ngtron

Easily serve and build angular based electron applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`npm run myapp:build-electron` fails

asgarli opened this issue · comments

Using newly released Angular CLI 8.0.0, I do, ng new myapp, select yes for routing, and SCSS for styling, and the app is generated. Then I cd into the folder and do ng add @richapps/ngtron. This command succeeds, however when I try to run ng run project:build-electron I get the error:

ENOENT: no such file or directory, copyfile 'C:\Users\Elchin\Projects\myapp\src\electron.ts' -> 'dist\myapp\electron.ts'
Error: ENOENT: no such file or directory, copyfile 'C:\Users\Elchin\Projects\myapp\src\electron.ts' -> 'dist\myapp\electron.ts'
    at Object.copyFileSync (fs.js:1724:3)
    at C:\Users\Elchin\Projects\myapp\node_modules\@richapps\ngtron\builders\build\index.js:47:18
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\Elchin\Projects\myapp\node_modules\@richapps\ngtron\builders\build\index.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:282:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

Thanks for the report.
I will have a fix later today. Until then you can manually copy the electron.ts file from the node_modules/@richapps/ngtron/schematics/ng-add/files/src folder into your projects src folder and you should be good to go.

It's not there. Looks like files/src isn't copied

But I copied it from the repo and it works.

Yeah indeed i excluded it in the npmignore :-(
Sorry for the confusion update on it`s way...
Thanx for reporting!

Error launching app
Unable to find Electron app at /home/blackshifu/Mibs/latest/dist/latest/electron.js

Cannot find module '/home/blackshifu/Mibs/latest/dist/latest/electron.js

@ellipizle Do you have a electron.ts in your src folder? Are you using the latest version?

@BenjaminDobler Please you can mark this issue as close, I have discovered it was because of how the app is structured. Thanks for your work and your quick response.

@ellipizle Allright glad it`s working for you now!