Can not start application due to > NX spawn ENAMETOOLONG

See original GitHub issue

I have a nrwl/nx angular application when I am trying to start I am getting the errors explaing below, this is my package.json:

{
  "name": "moniesta-admin",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2015 browser module main",
    "start": "nx serve",
    "build": "nx build",
    "test": "nx test"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~13.2.0",
    "@angular/cdk": "^13.0.0",
    "@angular/common": "~13.2.0",
    "@angular/compiler": "~13.2.0",
    "@angular/core": "~13.2.0",
    "@angular/forms": "~13.2.0",
    "@angular/localize": "~13.2.0",
    "@angular/material": "^13.2.2",
    "@angular/platform-browser": "~13.2.0",
    "@angular/platform-browser-dynamic": "~13.2.0",
    "@angular/router": "~13.2.0",
    "@nebular/auth": "^9.0.1",
    "@nebular/eva-icons": "^9.0.1",
    "@nebular/theme": "^9.0.1",
    "@ng-bootstrap/ng-bootstrap": "^11.0.0",
    "@nrwl/angular": "13.8.3",
    "bootstrap": "^5.1.3",
    "eva-icons": "^1.1.3",
    "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/cli": "13.8.3",
    "@nrwl/cypress": "13.8.3",
    "@nrwl/eslint-plugin-nx": "13.8.3",
    "@nrwl/jest": "13.8.3",
    "@nrwl/linter": "13.8.3",
    "@nrwl/tao": "13.8.3",
    "@nrwl/workspace": "13.8.3",
    "@schematics/angular": "~13.2.0",
    "@types/jest": "27.0.2",
    "@types/node": "16.11.7",
    "@typescript-eslint/eslint-plugin": "~5.10.0",
    "@typescript-eslint/parser": "~5.10.0",
    "cypress": "^9.1.0",
    "eslint": "~8.7.0",
    "eslint-config-prettier": "8.1.0",
    "eslint-plugin-cypress": "^2.10.3",
    "jest": "27.2.3",
    "jest-preset-angular": "11.1.1",
    "prettier": "^2.5.1",
    "ts-jest": "27.0.5",
    "typescript": "~4.5.2"
  }
}

Current Behavior

When trying to run npm run start I am getting the following error:

NX spawn ENAMETOOLONG

Expected Behavior

My application starts when I enter the npm run start command.

Steps to Reproduce

Generate an nrwl/nx Angular application and try to execute the npm run start command

Failure Logs

NX spawn ENAMETOOLONG

Environment

I am using vs code and hav npm lts version and nrwl the latest version. My application worked a week ago, when I had generated it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

13reactions
michael-goldencommented, Feb 22, 2022

I believe this is an issue related to uncommitted changes. I get this error when I have changes that have not been checked in. (not sure how the error originates). However, after committing the changes, the error resolves.

2reactions
Aboisiercommented, Apr 26, 2022

I had the same issue. I noticed I had 4k changes in my working copy. They were appearing because the .angular folder was not git-ignored. I added .angular/ to my .gitignore and it solved the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix spawn ENAMETOOLONG error nrwl nx workspace ...
First: Updating Nx to version 13.8.5. Do as below: Run command: nx migrate @nrwl/workspace@13.8.5; Run command: npm install; Run command ...
Read more >
because of the error the nx daemon process has exited. the next nx ...
I have just found a very misleading error being thrown by node v16.14.2 because of a trailing comma left in tsconfig.base.json file. Only...
Read more >
Can't deploy => Error: spawn ENAMETOOLONG - Questions
Versions : prisma/1.25.7 (windows-x64) node-v10.5.0 Running prisma deploy returns this cryptic error… Does anyone have a clue why or how I ...
Read more >
Archive Files task fails with error ENAMETOOLONG if ...
Your open channel to Microsoft engineering teams ... If the prepend option is not checked and the root folder contains a lot of...
Read more >
npm pythonshell spawn ENAMETOOLONG error : r/node
Hello i'm using pythonshell in my node js project to do data clustering using sklearn library, it works fine when i'm sending small...
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