-
Notifications
You must be signed in to change notification settings - Fork 12k
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
1.3.0 causes build to fail with - Cannot read property 'range' of null #7339
Comments
I am also experiencing this issue, as compared to a build --prod in 1.2.7 |
I have the same problem. I tried
But looking around this seems to be caused by a webpack version mismatch. |
I am getting this issue when trying to upgrade from version 1.2.0 to 1.3.0. I have tried deleting the node modules, clearing the node cache and trying again. The updated version of webpack is 3.4.1 |
Hi, it's failing for us with the same errors. We're working around it by switching off aot compilation - "ng build --prod --aot false". Hoping a CLI fix could resolve though as it's not something we'd want to do long-term |
It is weird that some people are getting this error and some are not.
Hopefully we have a some one from the CLI team looking into it soon. |
We are also working around this issue by locking the CLI version: Hopefully some light is shed on this at some point, as the error messages coming from webpack are impossible to decipher |
I am not using aot compilation (I use ng build --prod --aot false) and I get this error. I managed to get it working on my development machine, but I have not been able to get it working on the build machine, despite it having the same settings, doing 'npm cache clean' and deleting all node modules first. I tried changing to the webpack version explicitly stated as above (1.1.1) and this wanted @angular/core@^2.0.0, but I am on version 4.2.5 |
This seems to be partly some sort of caching issue. I have it working on my development server. On the build server, I've reinstalled the global version of the @angular/cli to be 1.2.8 (same as on development), reinstalled all project node packages, and released. npm cache clear has been used. I have made sure both environments are using the same version of npm. However, I get this error on the build server, but not on the development server. I have seen the issue come up on development and both are now reverted to be using 1.2.8 of the cli, globally and within the project. This fixed the issue on development, but not on the build server, |
Looks like it's related to UglifyJS. I ran Then I ran I don't have a service worker configure and I have no use of NODE_ENV so according to https://github.com/angular/angular-cli/wiki/build#bundling--tree-shaking UglifyJS is the only difference between the two builds. I also got the error without using --build-optimizer. |
localhost-1502908329170.txt Manny |
Facing same issue with 1.3.1 as well |
I have also tried 1.4.0-beta.1 and 1.4.0-beta.2 and the problem is still there. |
same here |
same here @angular/cli: 1.3.0 For me was related to the syntax of FormBuilder: This shortcut sintax NOT works
This works
Problem solved to me |
@rodolfojnn Thanks! Same issue. |
Hi all, I'd like to look into this but am having trouble reproducing it. Can someone give me steps I can follow in a new project to see the error? |
@filipesilva, my project has customer modules from another application, I use npm to install and than use them in the application. I will try to create a sample application to see if I can replicate. It may take me a few days to create it, someone may have a smaller application which they can shared it sooner. |
This might be related to #7408, users there also seem to be having some trouble related to the upgrade in Webpack internal plugins. |
@filipesilva I just tested my application using @angular/[email protected] and I not longer get the error. I tried testing it using just Thank you |
@filipesilva after testing, @rodolfojnn suggestion worked for me. In the code that uses Notice But only in the main bundle, other feature modules still have the former form. I wonder why this is the case. |
Same issue here on 1.3.0, .1, and .2. @rodolfojnn's suggestion worked as a solution. |
Like everyone else is saying @rodolfojnn's solution worked for me as well. |
I had the same error but the problem was an unnecessary comma in validators array: |
@tzachov Many thanks, exactly the same solution for me. |
Why is this issue closed? |
@kimamula the solutions provided here were sufficient for me. That's why I closed the issue. 😂 |
I'm still getting this on @angular/cli 1.6.6. |
I am experiencing this issue in multiple projects using the latest CLI version (1.6.6). As a workaround, I am avoiding the issue by disabling the build optimizer:
|
Same problem, helped return to older package versions. It look we have to stay on older packages. :-( |
Same issue with cli 1.6.6 ...
But works with
|
Same here... Compiles with -> ng build -prod --aot=false Failing also in non production build at runtime: at: on line: where moduleId: |
me too. if I downgraded Angular from 5.2.2 to 5.2.1 and it works. Other apps I'm working on do build with angular 5.2.2 and cli 1.6.6.. |
Having the same issue. |
Downgrading all packaged from 5.2.2 to 5.2.1 works for me. |
👍
👎
tested with ngCli v1.6.6/v1.6.5 and angular v5.2.1 |
I'm having this issue as well.
I tested with: |
Enabling vendor-chunk solve the issue temporarly
Tested with: |
@akhedrane Here is an open issue regarding this: angular/angular#21809 They are working on a solution. |
As a note, if you switch to |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
ng --version: 1.3.0
npm --version: 5.3.0
node --version: 8.1.4
Repro steps.
I have lazy loaded routes and feature modules
ng build --aot --prod
The log given by the failure.
Desired functionality.
Aot build without errors
Mention any other details that might be useful.
The text was updated successfully, but these errors were encountered: