Repository navigation
Closed
Closed
Copy link
Labels
regressionIndicates than the issue relates to something that worked in a previous versionIndicates than the issue relates to something that worked in a previous versiontype: bug/fix
Milestone
Description
🐞 bug report
Affected Package
Angular 8.2.0-next.0
I wasn't able to compile an Ivy project using @angular@8.2.0-next.0 with Ivy enabled. It compiles using @angular 8.1.0
Is this a regression?
Yes, the previous version in which this bug was not present was: Angular 8.1.0-next.3
Description
I'm trying to compile an existing project (@nrwl recommended structure) using Ivy
🔬 Minimal Reproduction
🔥 Exception or Error
ERROR in ENOTDIR: not a directory, scandir 'E:/Users/Juliano/Documents/Projetos/sa/sa-ui/saWorkspace/libs/issue-tracker/data-access/model/src/index.ts'
----------------------------------------------
10 silly lifecycle sa@0.0.0~build-pre: Args: [
10 silly lifecycle '/d /s /c',
10 silly lifecycle 'ng build --configuration=preproduction --base-href /tutoria/'
10 silly lifecycle ]
11 silly lifecycle sa@0.0.0~build-pre: Returned: code: 1 signal: null
12 info lifecycle sa@0.0.0~build-pre: Failed to exec build-pre script
13 verbose stack Error: sa@0.0.0 build-pre: `ng build --configuration=preproduction --base-href /tutoria/`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Users\Juliano\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:200:13)
13 verbose stack at ChildProcess. (C:\Users\Juliano\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:200:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid sa@0.0.0
15 verbose cwd E:\Users\Juliano\Documents\Projetos\sa\sa-ui\saWorkspace
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Juliano\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-pre"
18 verbose node v12.3.1
19 verbose npm v6.9.2
20 error code ELIFECYCLE
21 error errno 1
22 error sa@0.0.0 build-pre: `ng build --configuration=preproduction --base-href /tutoria/`
22 error Exit status 1
23 error Failed at the sa@0.0.0 build-pre script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Metadata
Metadata
Assignees
Labels
regressionIndicates than the issue relates to something that worked in a previous versionIndicates than the issue relates to something that worked in a previous versiontype: bug/fix
Activity
michael42 commentedon Jul 5, 2019
This might be the same issue that I get when setting
enableIvy: truein my project, but I find the description here pretty vague.tsconfig.json:When building, this with Angular 8.1.0, I'm getting an
ERROR in ENOTDIR: not a directory, scandir '{...}/client/src/config.dev.ts', which makes me think there's an assumption that the path mappings always map to a directory. Setting an exception breakpoint allowed me to get the stack trace:Maybe the
EntryPointFindershould check if the path mappings do in fact map to a directory or not.gkalpak commentedon Jul 6, 2019
I think you are right, @michael42. The changes in #30525 affect how pathMappings are used, but doesn't solve the problem in its current state (see https://github.com/angular/angular/pull/30525/files#r300829346).
spock123 commentedon Jul 8, 2019
Getting same issue, for me it's the environment files that give IVY a headache..
petebacondarwin commentedon Jul 9, 2019
This should be fixed as part of #30525
julianobrasil commentedon Jul 11, 2019
@petebacondarwin, in another project of mine, I use
linqts. It gives me a message slightly different:In fact, there's no
index.tson the folder mentioned on the error message. Is it a problem that I should post onlinqtsrepo?petebacondarwin commentedon Jul 11, 2019
Yes this is a bug in the
package.jsonfor linqts. See https://unpkg.com/linqts@1.12.5/package.jsonThe
es2015property should not point to the non-existingindex.tsfile.You can work around this by placing the following
ngcc.config.jsfile at the root of your project:This should tell ngcc to ignore this property in the
package.json.julianobrasil commentedon Jul 11, 2019
Great! I'll open an issue on that repo and continue with ivy testing.
julianobrasil commentedon Jul 11, 2019
Well, the compiler didn't like the
undefinedvalue:Is there a way to force it to accept it?[UPDATE]: it accepted
'dist/index.js'instead ofundefinedpetebacondarwin commentedon Jul 12, 2019
Interesting that it failed with the
undefined... glad you got a workaround working.petebacondarwin commentedon Jul 12, 2019
Actually I just realised that
linqtsdoes not contain any Angular, does it? In which case we could just tell ngcc to ignore it:That being said, it should already be ignored by ngcc as it has no
...metadata.jsonfile, so I am not sure why it is erroring in the first place.I tried:
which runs fine:
petebacondarwin commentedon Jul 12, 2019
Ahah! But running it targeted on the
linqtsdoes fail:leads to
which is what running via the CLI will do.
This will be fixed by #31509
julianobrasil commentedon Jul 12, 2019
Good to know! After following you fixing that one, I found a dependency (
ng2-file-upload), that became the next issue during compilation. It's maintained by valor-software. I'm reporting it to you here because it's kind of old (it uses @angular@2.x.x). Honestly, it seems to be abandoned (for this Ivy testing I've just replaced it by an updated version made available by another user of that library). My question is: should I report to you guys this kind of thing (very old angular-based dependencies) or save your time and just replace it in these projects (it's not healthy to keep abandoned projects as dependencies anyway).petebacondarwin commentedon Jul 12, 2019
ng2-file-upload is on our radar. See https://docs.google.com/spreadsheets/d/1TEawfLbWQjqTDst2Jrm2KF6udMVMjuKiz8LG4NPD7WQ/edit#gid=0
angular-automatic-lock-bot commentedon Sep 15, 2019
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.