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

error: Cannot assign to read only property '$methodName' of false Use --force to continue #139

Closed
eouin opened this issue Feb 16, 2015 · 11 comments

Comments

@eouin
Copy link

eouin commented Feb 16, 2015

Hi,

Can you tell me what that error is all about:

Running "ngAnnotate:dev" (ngAnnotate) task
Warning: Cannot assign to read only property '$methodName' of false Use --force to continue.
TypeError: Cannot assign to read only property '$methodName' of false

Thanks

@olov
Copy link
Owner

olov commented Feb 16, 2015

dupe of #126

upgrade to the latest ng-annotate and things will work fine

@olov
Copy link
Owner

olov commented Mar 10, 2015

@linslin ?

@linslin
Copy link

linslin commented Mar 10, 2015

upgrade to the latest ng-annotate and things will work fine

This worked for me. =)

@olov
Copy link
Owner

olov commented Mar 10, 2015

aah of course. good! :)

@leolux
Copy link

leolux commented Aug 31, 2015

I have updated grunt-ng-annotate using the command "update grunt-ng-annotate" but the issue still appears. Here is my version after the update:
├─┬ grunt-ng-annotate@0.6.0
│ └─┬ ng-annotate@0.12.1
│ ├── acorn@0.9.0
│ ├── alter@0.2.0
│ ├── convert-source-map@0.4.1
│ ├── esprima@1.2.5
│ ├─┬ optimist@0.6.1
│ │ └── minimist@0.0.10
│ ├─┬ ordered-ast-traverse@0.1.1
│ │ └── ordered-esprima-props@1.0.0
│ ├── simple-fmt@0.1.0
│ ├── simple-is@0.2.0
│ ├── source-map@0.1.43
│ ├── stable@0.1.5
│ ├── stringmap@0.2.2
│ ├── stringset@0.2.1
│ └── tryor@0.1.2

@olov In which version has this issue been fixed?

@leolux
Copy link

leolux commented Aug 31, 2015

Well, the update commant does not work as expected. But I found a way which really updates the package and solves the issue

  1. manually change the version in package.json to "grunt-ng-annotate": "^1.0.1"
  2. run npm install
  3. Issue is solved

@bbarczak-squiz
Copy link

@leolux Thank you, you saved the day ;)

@GenisDiaz
Copy link

@leolux Thank you!

@sjoerdoudman
Copy link

Great!
this fixed my problem two. Forcing past this and this when building causes the following error in the dist version:

Failed to instantiate module due to:
Error: [$injector:unpr] Unknown provider: a

bkarthiksf added a commit to bkarthiksf/boilerplate-gulp-angular that referenced this issue May 13, 2016
Upgrade ng-annotate to 0.5.2 so it builds with node versions 0.12.x
For more information see olov/ng-annotate#139
@erperejildo
Copy link

Updating package or changing version in package.json and running npm install after that don't help me

@edge777
Copy link

edge777 commented Feb 23, 2019

Updating package or changing version in package.json and running npm install after that don't help me

You need to manually change it in your package.json file with a tilde sign on the front. eg.. 1. "grunt-ng-annotate": "~0.5.2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants