Comments (9)
hey I did the repo first https://github.com/ducin/angular-issue-not-exported-class 😅
from angular-cli.
Closed via angular/angular#54309
from angular-cli.
Seems like there was a related issue on the FW repo : angular/angular#53678
There framework throwing an error is one thing, but it should thrown correctly by the application builder.
from angular-cli.
This is a bug in the compiler as calling compilation.diagnoseFiles()
is retuning undefined
which should never happen.
from angular-cli.
@alan-agius4 which compilation
is that? I don't think we have a diagnoseFiles
function anywhere in ngc
.
from angular-cli.
@alxhub, apologies, I did not initial realize that it's an Angular CLI implementation.
from angular-cli.
This is similar to : angular/angular#53678 where the compiler is throwing a FatalDiagnosticError
on the typecheck file. Now since this is not an instance of Error
the Piscina will assume that an error did not occur and will not exit successfully and not with an error.
FatalDiagnosticError {
code: 3004,
node: <ref *1> SourceFileObject {
pos: 0,
end: 0,
flags: 0,
modifierFlagsCache: 0,
transformFlags: 0,
parent: undefined,
kind: 312,
statements: [ pos: 0, end: 0, hasTrailingComma: false, transformFlags: 0 ],
endOfFileToken: TokenObject {
pos: 0,
end: 0,
flags: 0,
modifierFlagsCache: 0,
transformFlags: 0,
parent: [Circular *1],
kind: 1
},
text: '',
fileName: '/next/src/main.ngtypecheck.ts',
path: '',
resolvedPath: '',
originalFileName: '',
languageVersion: 99,
languageVariant: 0,
scriptKind: 3,
isDeclarationFile: false,
hasNoDefaultLib: false,
locals: undefined,
nextContainer: undefined,
endFlowNode: undefined,
nodeCount: 2,
identifierCount: 0,
symbolCount: 0,
parseDiagnostics: [],
bindDiagnostics: [],
bindSuggestionDiagnostics: undefined,
lineMap: undefined,
externalModuleIndicator: undefined,
setExternalModuleIndicator: [Function: setExternalModuleIndicator],
pragmas: Map(0) {},
checkJsDirective: undefined,
referencedFiles: [],
typeReferenceDirectives: [],
libReferenceDirectives: [],
amdDependencies: [],
commentDirectives: undefined,
identifiers: Map(0) {},
packageJsonLocations: undefined,
packageJsonScope: undefined,
imports: undefined,
moduleAugmentations: undefined,
ambientModuleNames: undefined,
classifiableNames: undefined,
impliedNodeFormat: undefined,
jsDocParsingMode: 0,
[Symbol(AbsolutePath)]: '/next/src/main.ngtypecheck.ts'
},
message: {
category: 3,
code: 0,
messageText: 'Unable to import symbol Child.',
next: [ [Object] ]
},
relatedInformation: [
{
category: 3,
code: 0,
file: [SourceFileObject],
start: 117,
length: 130,
messageText: 'The symbol is declared here.'
}
],
_isFatalDiagnosticError: true
}
From my understanding the Angular compiler should never surface a FatalDiagnosticError
, and it should be transformed to a diagnostics
internally. Is this correct @alxhub / @JoostK? As otherwise, we'd need to expose FatalDiagnosticError
and isFatalDiagnosticError
APIs from the Compiler and make them accessable to the Angular CLI.
So in my eyes there are 2 problems here:
- The error points to a typecheck file
- The check in https://github.com/angular/angular/blob/f39cb064183d984254bdf4e41b61d3dc9379738a/packages/compiler-cli/src/ngtsc/core/src/compiler.ts#L457-L461 should be changed so that if it's a
FatalDiagnosticError
it is not thrown.
//cc @devversion, who modified the above code recently in angular/angular@760b1f3
from angular-cli.
Yeah, so to clarify: Before my "fix", we did not catch fatal diagnostics at all when collecting extended diagnostics. This surfaced these super hard to debug errors when e.g. a class was not exported and the TCB code couldn't be generated at all- the same is used for extended diagnostics.
It looks like as part of my fix, I did forget returning early and therefore diagnostics are converted properly now (before they weren't)- but we are still throwing. So my fix was a noop. I'm sending a fix- but the root causes are still:
- Need to fix that we are not throwing- like I was attempting to do with my PR
- CLI should be improved to not swallow runtime exceptions error. It was non-trivial to debug this back then
from angular-cli.
The error is being swallowed as FatalDiagnosticError
is not Error
which causes the worker to exit without an error. See check in piscinajs. As per convo with @devversion, he will try to make these as errors.
from angular-cli.
Related Issues (20)
- Custom vite middleware is not executed for CSS files HOT 4
- ng serve doesn't work in Bun HOT 3
- extract-i18n shows "browserTarget" warning HOT 2
- `externalPackagesPlugin` slows down `ng serve` substantially HOT 1
- How to debug jest tests? HOT 2
- Facing Unable to locate stylesheet in 'dist/apps/products/browser/products/styles.21412123jhas.css'. in Angular 14 build with deployUrl="products" HOT 2
- ng serve / ng build does not work on Windows dev drive mounted as a volume
- crossOriginIsolated is false in SharedWorker despite correct COEP and COOP headers HOT 2
- "./node_modules/@angular/*" cause NG0203: `inject()` must be called from an injection context such as a constructor HOT 10
- Schema validation fails when replacing `.mts` file with another one HOT 1
- `ng add @angular/material@16` fails with Angular 17 HOT 3
- Path defined in tsconfig not working properly HOT 3
- @angular/cli 17.2.0 incorrect display via ng version HOT 4
- Incorrect peer dependencies versions on 17.2.0 HOT 3
- new application builder and dynamic imports, ignore resources that are not there on the server (404) HOT 2
- [Angular 17] Dockerizing Angular project giving several errors like NG8001, NG8002, NG8003 HOT 2
- [Angular 17] Dockerizing Angular project giving several errors like NG8001, NG8002, NG8003 HOT 1
- Support for multiple CSS Frameworks / Partial Build depends on Environment Variables HOT 2
- Vite 404 error in VS Code debug console: `Could not read source map...` HOT 1
- [ERROR] Could not resolve "../../assets/fonts/my-font.woff" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-cli.