Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Stop creating long paths #37

@PieterjanDeClippel

Description

@PieterjanDeClippel

Environment

  • Windows 10 Pro
  • Angular 12
  • @nguniversal/express-engine

package.json

{
  "name": "client-app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "build:ssr_bak": "npm run build:client-and-server-bundles && npm run compile:server",
    "serve:ssr_bak": "node dist/server",
    "build:client-and-server-bundles_bak": "ng build --prod && ng run ClientApp:server:production --bundleDependencies all",
    "compile:server_bak": "webpack --config webpack.server.config.js --progress --colors",
    "dev:ssr": "ng run ClientApp:serve-ssr",
    "serve:ssr": "node dist/server/main.js",
    "build:ssr": "ng build --prod && ng run ClientApp:server:production",
    "prerender": "ng run ClientApp:prerender"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~12.0.2",
    "@angular/common": "~12.0.2",
    "@angular/compiler": "~12.0.2",
    "@angular/core": "~12.0.2",
    "@angular/forms": "~12.0.2",
    "@angular/platform-browser": "~12.0.2",
    "@angular/platform-browser-dynamic": "~12.0.2",
    "@angular/platform-server": "~12.0.2",
    "@angular/router": "~12.0.2",
    "@angular/service-worker": "~12.0.2",
    "@mintplayer/ng-json-ld": "^1.0.2",
    "@mintplayer/ng-router": "^1.3.0",
    "@nguniversal/express-engine": "^12.0.1",
    "@ngx-translate/core": "^12.1.2",
    "@ngx-translate/http-loader": "^4.0.0",
    "@types/youtube": "0.0.38",
    "aspnet-prerendering": "^3.0.1",
    "bootstrap": "^4.4.1",
    "caniuse-lite": "^1.0.30001023",
    "express": "^4.15.2",
    "font-awesome": "^4.7.0",
    "guid-typescript": "^1.0.9",
    "ng-click-outside": "^5.3.0",
    "rxjs": "~6.5.5",
    "tslib": "^2.0.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~12.0.2",
    "@angular/cli": "~12.0.2",
    "@angular/compiler-cli": "~12.0.2",
    "@angular/language-service": "~12.0.2",
    "@nguniversal/builders": "^9.1.0",
    "@types/express": "^4.17.0",
    "@types/jasmine": "~3.6.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.11.1",
    "codelyzer": "^6.0.0",
    "jasmine-core": "~3.6.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~5.0.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "~7.0.0",
    "ts-loader": "^5.2.0",
    "ts-node": "~7.0.0",
    "tslint": "~6.1.0",
    "typescript": "~4.2.4",
    "webpack-cli": "^3.1.0"
  }
}

Windows by default only supports path lengths up to 260 characters.
Enabling NTFS long paths only enables it for the NTFS-filesystem, so your drive can store files for paths longer than 260 characters.
Windows Explorer does not support the LongPathApi.
Visual Studio does not support the LongPathApi.
VS Code does not support the LongPathApi.
Netbeans does not support the LongPathApi.

I have an ASP.NET Core application with angular frontend using SSR. Publishing fails due to long paths being generated.

Could not copy
C:\Users\piete\source\repos\MintPlayer\MP.Web\ClientApp\node_modules\webdriver-js-extender\built\built\built\built\built\built\built\built\built\built\built\built\built\built\built\built\spec\command_tests\totally_real_apk.apk
to
C:\Users\piete\source\repos\MintPlayer\MP.Web\obj\Release\netcoreapp3.1\PubTmp\Out\ClientApp\node_modules\webdriver-js-extender\built\built\built\built\built\built\built\built\built\built\built\built\built\built\built\built\spec\command_tests\totally_real_apk.apk

Exceeded retry count of 10.

In the past this has been happening with @nguniversal/express-engine too, where the build process generates files at unnecessarily long paths, containing 2 hashes of 100 length, causing the build to fail. This seems to keep recurring...

built\built\built\built\built\built\built\built\built\built\built\built\built\built\built\built

Why would you do such a thing, and keep doing it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions