-
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
Error during prod build in Angular Cli #7725
Comments
Same here with @angular/[email protected]
|
I got this error when I included a script file inside the angular-cli.json written in es6. I converted it to es5 by change 'let' back to 'var' and removing arrow functions. |
Im getting this error when i run 95% emittingUnhandled rejection Error: ENOENT: no such file or directory, open
'C:\Users\story\pro\ng-app\node_modules\_@[email protected]@@angular\packa
ge.json' The version is: @angular/cli: 1.4.2
node: 7.10.0
os: win32 x64
@angular/animations: 4.4.3
@angular/common: 4.4.3
@angular/compiler: 4.4.3
@angular/core: 4.4.3
@angular/forms: 4.4.3
@angular/http: 4.4.3
@angular/platform-browser: 4.4.3
@angular/platform-browser-dynamic: 4.4.3
@angular/router: 4.4.3
@angular/cli: 1.4.2
@angular/compiler-cli: 4.4.3
@angular/language-service: 4.4.3
typescript: 2.3.4 |
@thekhoi you are right. I've got a custom script included in |
Yes, one thing is confirmed, this is due to external scripts. I am using bootstrap 4 in my project and it has a dependency on popper.min.js and it is based on es6. I changed my "target": "es2016", in my tsconfig file and it's working now besides a few warnings, still figuring out how to get rid of them. |
updating to es2016 was still messing up with some of my other libraries and it was not suitable. so what I did, I installed popper.js separately via npm and used umd version which is compatible with es5, and changed the target to es5 again in tsconfig and it solved my problem. |
Same here. I also use Bootstrap 4 and Pooper.js. @angular/cli: 1.4.3 .angular-cli.json
|
Thanks, it restore production build for me |
@chetanvaja did you resolve this issue sir ? can you close this if you finished ? |
Hello, It is still not work with version 1.4.9, any workaround? Thanks |
Same here with @angular/[email protected]
How do we fix this? Anyone please respond I am in haste. |
Same here -> working with Bootstrap 4 and Popper.js |
Facing the same issue in @angular/[email protected] when trying to user Bootstrap with Popper.js in my Angular app. |
@sunny061 Use the solution i mentioned |
@umarkashmiri I've temporarily solved the problem by downgrading the angular cli to 1.3.2 as mentioned in this answer. https://stackoverflow.com/a/46330054/1874266 |
This type of error occurs when you try to use ES2015 vendor code with a ES5 app. It was addressed when we added ES2105 support in #7610. |
I found a solution: https://stackoverflow.com/a/47654981/1820522 |
@PendelinP this is what I mentioned above. |
I have the same issue. I'm not using Bootstrap nor popper.js. As this issue post has been closed, I suppose this has been fixed. But where and how? My "target" is "es5" while my "lib" is "es2017". Could this be the issue? Changing es5 to es2017 yields the same result. Any help or fix? |
I have similar issue when running
I've tracked the problem to the include of a particular script via the
... and further, I suspect the error happens during the minification stage (when uglifyjs would be invoked). I can't seem to find any way to get further logging / diagnostics from |
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.
Repro steps.
The log given by the failure.
94% asset optimization(node:11160) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token: operator (>)
(node:11160) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Desired functionality.
Mention any other details that might be useful.
I can do normal build only build in prod fails with above error.
greatly appreciate help here.
While I have read the Promise Then and Catch - I have followed the pattern in my source code every where but exact issue is missing and I cant really build anymore.
The text was updated successfully, but these errors were encountered: