Skip to content
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

Uncaught ReferenceError: Invalid left-hand side expression in postfix operation #5156

Closed
sarn3792 opened this issue Mar 2, 2017 · 6 comments

Comments

@sarn3792
Copy link

sarn3792 commented Mar 2, 2017

Hi.

When I run ng build --prod command the following error is shown:
error_

After that, I copy the files within dist folder and past them onto IIS folder and this error is thrown:
image

It's important to mention that when the project is running by ng serve runs without errors
image

I'm using ng2-charts and bootstrap.

The source code is on: https://github.com/sarn3792/CRMInformation

Hope you can help me!

Thanks :)

@Brocco
Copy link
Contributor

Brocco commented Mar 2, 2017

@sarn3792 I was facing a very similar issue yesterday. The way I was able to resolve it was to remove my node_modules, run npm cache clean and then npm install.

Also it appears your version of the CLI is beta26, about a week ago we released release candidate 0, I would suggest upgrading to the latest for many bug fixes and improvements. Please report back!

@sarn3792
Copy link
Author

sarn3792 commented Mar 2, 2017

Sorry but I'm a beginner in angular2. Should I remove my project's node_modules path, then run the above commands and after that recreate my project?

Thanks!

@Brocco
Copy link
Contributor

Brocco commented Mar 2, 2017

No problem.

I think the first thing you should do is update your version of the CLI.

Run these command in sequence to uninstall, clean your npm's local cache and re-install the latest verision

npm uninstall angular-cli -g
npm cache clean
npm install @angular/cli -g

With that being done, create a test project and build to ensure we're at a good point.

ng new test-project
cd test-project
ng build -prod

Now copy the dist folder to your IIS folder and verify if it is working or not.

If it's not working, please post your log from the prod build and any errors in the browser's console.

If it is working, I would suggest creating a new project and moving your CRM project's code into the new project.

@erlingne
Copy link

erlingne commented Mar 2, 2017

This issue is caused by the uglifyjs-webpack-plugin implementation of [email protected].
[email protected] was quickly released for compability.

See:
mishoo/UglifyJS#1516

@sarn3792
Copy link
Author

sarn3792 commented Mar 2, 2017

After that @Brocco instructions my project is working correctly.

Thanks so much!

@sarn3792 sarn3792 closed this as completed Mar 2, 2017
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants