Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The build fails due to missing file after upgrade. #18534

Closed
2 of 15 tasks
TrevorKarjanis opened this issue Aug 14, 2020 · 4 comments · Fixed by #18540
Closed
2 of 15 tasks

The build fails due to missing file after upgrade. #18534

TrevorKarjanis opened this issue Aug 14, 2020 · 4 comments · Fixed by #18540

Comments

@TrevorKarjanis
Copy link
Contributor

🐞 Bug report

Command

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was 10.0.1.

Description

After running ng update @angular/cli --next in order to fix issue #18040 , the build fails with the error below. It appears the migration did not update a path in src/tsconfig.app.json. After fixing that, there is another error with tsconfig.json which extends a non-existent configuration, and the compiler options from base are missing. After fixing that, the build succeeds. I reproduced with a new application generated with version 10.0.1.

🔬 Minimal Reproduction

> ng new my-app
> ng build
> ng update @angular/cli --next
> ng build

🔥 Exception or Error

> my-app@4.0.0 build /Users/trevor/my-app
> ng build

An unhandled exception occurred: error TS5083: Cannot read file '/Users/trevor/MyApp/tsconfig.base.json'.

See "/private/var/folders/lt/77mxdc9s0bl0ff37cm33cjzh0000gn/T/ng-bqLn9R/angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! insight-cm@4.0.0 build: `ng build`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the insight-cm@4.0.0 build 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/trevor/.npm/_logs/2020-08-14T19_44_27_149Z-debug.log
> my-app@4.0.0 build /Users/trevor/my-app
> ng build

An unhandled exception occurred: error TS5083: Cannot read file '/Users/trevor/MyApp/tsconfig.json'.

See "/private/var/folders/lt/77mxdc9s0bl0ff37cm33cjzh0000gn/T/ng-K3RBoq/angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! my-app@0.0.0 build: `ng build`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the my-app@0.0.0 build 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/trevor/.npm/_logs/2020-08-14T20_20_25_913Z-debug.log

🌍 Your Environment

Angular CLI: 10.1.0-next.5
Node: 12.18.1
OS: darwin x64

Angular: 10.1.0-next.5
... animations, cli, common, compiler, compiler-cli, core
... elements, forms, language-service, localize
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1001.0-next.5
@angular-devkit/build-angular      0.1001.0-next.5
@angular-devkit/build-ng-packagr   0.1001.0-next.5
@angular-devkit/build-optimizer    0.1001.0-next.5
@angular-devkit/build-webpack      0.1001.0-next.5
@angular-devkit/core               10.1.0-next.5
@angular-devkit/schematics         10.1.0-next.5
@angular/cdk                       10.0.1
@angular/flex-layout               10.0.0-beta.32
@angular/material                  10.0.1
@ngtools/webpack                   10.1.0-next.5
@schematics/angular                10.1.0-next.5
@schematics/update                 0.1001.0-next.5
ng-packagr                         10.0.0
rxjs                               6.5.5
typescript                         3.9.5
webpack                            4.44.1

Anything else relevant?

Sent from my pool office, cheers! 🍻

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Aug 14, 2020

@TrevorKarjanis, thanks for reporting this and apologies for the inconvenience.

@napei
Copy link

napei commented Aug 15, 2020

+1 after running the 10.1 migration introduced in #18478 my tsconfig.json decided it needs to extend a non-existent config, and tsconfig.base.json was deleted, while tsconfig.app.json was not and still reference .base

tsconfig.json

{
  "extends": "../tsconfig.json",
  "files": [],
  "references": [
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.spec.json"
    }
]
}

Further to this the migration also didn't touch the tsconfig.json in the e2e folder, which still wants to point to ../tsconfig.base.json which no longer exists.

@Splaktar
Copy link
Member

I saw this too after this commit from ng update:
angular-hispano/angular-hispano@9b03c98

Fixed via this commit:
angular-hispano/angular-hispano@14b47a9

alan-agius4 added a commit that referenced this issue Aug 17, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.