cgross / generator-cg-angular

Yeoman generator for Enterprise Angular projects.
MIT License
592 stars 198 forks source link

(ngAnnotate) task Warning: Cannot assign to read only property '$methodName' of false #130

Open bdairy opened 8 years ago

bdairy commented 8 years ago

Hello.,, I am new to the hole yeomen thing ,, so that might look silly. I've installed the generator as per the steps ..but when grunt build I recieve this issue: Running "ngAnnotate:main" (ngAnnotate) task Warning: Cannot assign to read only property '$methodName' of false Use --force to continue.

Aborted due to warnings.

Below you can see the whole log for the build,, also please notice that the sub generators are working just fine,, and other generators are installed and working perfectly on my machine... I have updated the ngAnnotate plugin,, but nothing happed... btw the serve and test tasks fails as well..

Running "jshint:main" (jshint) task

3 files lint free.

Running "clean:before" (clean) task

Running "less:production" (less) task File temp/app.css created.

Running "dom_munger:read" (dom_munger) task

Processing index.html Wrote script[data-concat!="false"].src to dom_munger.data.appjs Wrote link[rel="stylesheet"][data-concat!="false"].href to dom_munger.data.appcss

Running "dom_munger:update" (dom_munger) task

Processing index.html Removed script[data-remove!="false"] Removed link[data-remove!="false"] Appended to body Appended to head File dist/index.html created/updated.

Running "ngtemplates:main" (ngtemplates) task

No templates found File temp/templates.js created.

Running "cssmin:main" (cssmin) task File dist/app.full.min.css created.

Running "concat:main" (concat) task File "temp/app.full.js" created.

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

Aborted due to warnings.

woollsta commented 8 years ago

This is the same issue as #102, the version of ngAnnotate used by the cg-angular generator is outdated. To update it, in the root of your application there should be a package.json file. You need to change version on the line "grunt-ng-annotate" to "~0.10.0", and then save the file. Then from the command line and in the root directory of your app, run 'npm update grunt-ng-annotate'. Then try your build process again.

bdairy commented 8 years ago

Thanks @woollsta for your replay,, ng-annotate thing is solved by following your instruction.. the grunt build command works perfectly... now I have the other issue which is the serve,,, when I serve I got nothing.. Just waiting,,, and no browser window opens. please check the output below.

grunt serve Running "dom_munger:read" (dom_munger) task

Processing index.html Wrote script[data-concat!="false"].src to dom_munger.data.appjs Wrote link[rel="stylesheet"][data-concat!="false"].href to dom_munger.data.appcss

Running "jshint:main" (jshint) task

3 files lint free.

Running "connect:main" (connect) task Started connect web server on http://localhost:9001

Running "watch" task Waiting...

woollsta commented 8 years ago

No problem @bdairy.

With regards to the grunt serve, that's the intended outcome. You will need to manually open a browser at http://localhost:9001 to view the application, but the console saying 'Waiting...' is actually referring to the 'watch' task checking for file alterations to trigger a live-reload, and is a sign that it is working normally. Counter-intuitive I guess you could say haha.

bdairy commented 8 years ago

thank @woollsta this is awesome, it is working,, so haha..I love the way this generator works , but I wish that it has an option to have a SASS option for bootstrap,, or to just replace Less with SASS..