bennymeg / nx-electron

Electron schematics for nrwl nx platform
Apache License 2.0
333 stars 85 forks source link

ENOENT: no such file or directory, stat 'C:\Users\XXXX\Entwicklung\pid\apps\myElectronApp\src\assets' #140

Closed andreElrico closed 2 years ago

andreElrico commented 2 years ago

Describe the bug running nx run counter-electron:build lead to error: ENOENT: no such file or directory, stat 'C:\Users\XXXX\Entwicklung\pid\apps\myElectronApp\src\assets'

i have deleted the the path in assets in build.options and it successfuly build the app.

  "dependencies": {
    "@angular/animations": "~13.2.0",
    "@angular/common": "~13.2.0",
    "@angular/compiler": "~13.2.0",
    "@angular/core": "~13.2.0",
    "@angular/forms": "~13.2.0",
    "@angular/platform-browser": "~13.2.0",
    "@angular/platform-browser-dynamic": "~13.2.0",
    "@angular/router": "~13.2.0",
    "rxjs": "~7.4.0",
    "tslib": "^2.0.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~13.2.0",
    "@angular-eslint/eslint-plugin": "~13.0.1",
    "@angular-eslint/eslint-plugin-template": "~13.0.1",
    "@angular-eslint/template-parser": "~13.0.1",
    "@angular/cli": "~13.2.0",
    "@angular/compiler-cli": "~13.2.0",
    "@angular/language-service": "~13.2.0",
    "@nrwl/angular": "^13.8.1",
    "@nrwl/cli": "12.10.1",
    "@nrwl/cypress": "13.8.1",
    "@nrwl/eslint-plugin-nx": "13.8.1",
    "@nrwl/jest": "13.8.1",
    "@nrwl/linter": "13.8.1",
    "@nrwl/tao": "12.10.1",
    "@nrwl/workspace": "12.10.1",
    "@types/jest": "27.0.2",
    "@types/node": "14.14.33",
    "@typescript-eslint/eslint-plugin": "~5.10.0",
    "@typescript-eslint/parser": "~5.10.0",
    "cypress": "^9.1.0",
    "electron": "^17.0.0",
    "eslint": "~8.7.0",
    "eslint-config-prettier": "8.1.0",
    "eslint-plugin-cypress": "^2.10.3",
    "exitzero": "^1.0.1",
    "jest": "27.2.3",
    "jest-preset-angular": "11.0.0",
    "nx-electron": "^12.0.0",
    "prettier": "^2.3.1",
    "ts-jest": "27.0.5",
    "typescript": "^4.5.5"
  }
Kennybll commented 2 years ago

If you create an assets folder under src it will also work. I ran into this error as well.

andreElrico commented 2 years ago

that was my first guess, however after creating that folder I got a "glob-somepath-error". Maybe I did something wrong 😋 ...

Kennybll commented 2 years ago

I'm on NX 13.7.2 using https://github.com/Instra-AI/nx-electron which is a fork.

All I just changed generate-package-json.ts to use @nrwl/devkit, and upgraded webpack/types. I did initially get that error (as well as not having electron-builder). But I created the assets folder and I've been able to build, package, and make my project. Not sure if what I did solved the "glob-somepath-error" or not, but I didn't see it.

bennymeg commented 2 years ago

If you create an assets folder under src it will also work. I ran into this error as well.

@andreElrico does that fix the issue?

andreElrico commented 2 years ago

I have used my workaround. It was sufficient for me. Have not tried anything else.

bennymeg commented 2 years ago

fixed on 12.1.0