question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failing to start electron app placed in a directory

See original GitHub issue

Expected Result Electron app to open when run.

Current Behaviour

yarn run v1.19.2
warning package.json: "dependencies" has dependency "@nstudio/xplat" with range "^8.0.13" that collides with a dependency in "devDependencies" of the same name with version "8.0.13"
warning package.json: "dependencies" has dependency "@nrwl/angular" with range "^8.8.2" that collides with a dependency in "devDependencies" of the same name with version "~8.8.0"
warning package.json: "dependencies" has dependency "@nstudio/electron" with range "^8.0.13" that collides with a dependency in "devDependencies" of the same name with version "8.0.13"
$ npm run prepare.electron.desktop-app && npm-run-all -p serve.electron.desktop-app.target serve.electron.desktop-app
npm WARN lifecycle The node binary used for scripts is /var/folders/xr/7cp2hsfd139b6tx_t_tjysfw0000gn/T/yarn--1574687993525-0.15629264163149914/node but npm is using /usr/local/Cellar/node@12/12.13.1/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> demo-suite@0.0.0 prepare.electron.desktop-app /Users/joelmuskwe/Projects/workspace/demo-suite
> npm run postinstall.electron && tsc -p apps/electron-desktop-app/tsconfig.json

npm WARN lifecycle The node binary used for scripts is /var/folders/xr/7cp2hsfd139b6tx_t_tjysfw0000gn/T/yarn--1574687993525-0.15629264163149914/node but npm is using /usr/local/Cellar/node@12/12.13.1/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> demo-suite@0.0.0 postinstall.electron /Users/joelmuskwe/Projects/workspace/demo-suite
> node tools/electron/postinstall

error TS5058: The specified path does not exist: 'apps/electron-desktop-app/tsconfig.json'.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! demo-suite@0.0.0 prepare.electron.desktop-app: `npm run postinstall.electron && tsc -p apps/electron-desktop-app/tsconfig.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the demo-suite@0.0.0 prepare.electron.desktop-app script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/joelmuskwe/.npm/_logs/2019-11-25T13_19_55_697Z-debug.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Log File 2019-11-25T13_19_55_697Z-debug.log

Steps taken to reproduce error

  1. yarn create nx-workspace -> demo-suite -> empty workspace -> angular-cli

  2. cd demo-suite

  3. ng add @nrwl/angular -> jest -> cypress

  4. ng g @nrw/angular:application --directory admin desktop -> scss -> routing: true

  5. ng add @nstudio/xplat -> not right now -> not right now

  6. ng add @nstudio/web-angular

  7. ng add @nstudio/electron

  8. ng g app -> desktop-app -> electron (app type) -> angular (framework) -> no (xplat supporting architecture) -> admin-desktop (name of web app) -> admin (directory)

  9. yarn start.electron.desktop-app

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
joelmuskwecommented, Nov 27, 2019

@vladimirdrayling thank you for the assist in my demo-suite now i know what changes i will need to do to make it compatible with my existing project.

0reactions
joelmuskwecommented, Nov 26, 2019

@vladimirdrayling thanks for the reply, my problem is i have an application that was based on nx using angular cli and not on Extensible CLI for JavaScript and TypeScript applications. was hoping to use xplat in it. coz after creating workspace based on nx cli i am failing to add @nwrl/angular for the workspace to also support angular the nx way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

electron-rebuild "Unable to find Electron app ..." - Stack Overflow
Another important thing is, just check once the dependencies by running command npm list --depth=0 and confirm that electron is there. Share.
Read more >
Building a desktop app with Electron and Create React App
A step-by-step tutorial explaining how to create a desktop application using Create React App (CRA) and Electron.
Read more >
Creating an Electron application from scratch
The folder structure for an Electron application ... Run npm init -y in the [project] level directory in order to create our application....
Read more >
app | Electron
setAppLogsPath() without a path parameter will result in this directory being set to ~/Library/Logs/YourAppName on macOS, and inside the userData directory on ...
Read more >
Packaging and distributing Electron applications using ...
The directories.app path (also called the app directory or application directory) is the directory where package.json file is located (defaults ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found