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
Angular library build error "Cannot read properties of null (reading 'render')" #4503
Comments
Same issues. Not only that but compilation now produces different and wrong results when not using optional chaining! This is a major issue for us and might break other libs and applications because it is not noticed while compiling. It completely drops use cases and passes Adding Source Code:
Previous compilation:
Current compilation:
|
Rollup does not inject |
And for the initial error which seems completely unrelated to the second one (maybe it should be a separate issue?): If you cannot give a reproduction, is there a way to print the stack trace of the error? It would seem very odd to me that optional chaining would cause an error |
In any case, I feel with you, but I need reproductions, not code snippets. |
Here you can see that
|
Made seperate issue and added reproduction repo |
related to |
I created a new PR #4510 that reimplements parameter tree-shaking in a more conservative way. Could you verify that this PR works for you via |
Rollup Version
2.74.0 (latest)
Operating System (or Browser)
Windows 10
Node Version (if applicable)
16.15.0
Link To Reproduction
not applicable
Expected Behaviour
Passing the ng build
Actual Behaviour
Error:
Running ng build on angular library gives the following error
Cannot read properties of null (reading 'render')
Disclaimer:
Being this an enterprise project I can´t provide more information but I think that the problem is related to the changes made by using the optional chaining operator
Workaround:
By adding the following in the package.json devDependencies, it works fine:
"rollup": "2.72.1",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "13.3.0"
The text was updated successfully, but these errors were encountered: