0

I'm new to AngularJS. I'm installing the AngularJS and stuck at following step:

grunt package.

Error is as follows:

Loading "Gruntfile.js" tasks...ERROR
>> Error: Unable to read CDN version, are you offline or has the CDN not been properly pushed?
>>     at Object.module.exports (D:\angular.js\Gruntfile.js:21:11)
>>     at loadTask (D:\angular.js\node_modules\grunt\lib\grunt\task.js:325:10)
>>     at Task.task.init (D:\angular.js\node_modules\grunt\lib\grunt\task.js:437:5)
>>     at Object.grunt.tasks (D:\angular.js\node_modules\grunt\lib\grunt.js:120:8)
>>     at Object.module.exports [as cli] (D:\angular.js\node_modules\grunt\lib\grunt\cli.js:38:9)
>>     at Object.<anonymous> (C:\Users\rnaguban\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt:44:20)
>>     at Module._compile (module.js:409:26)
>>     at Object.Module._extensions..js (module.js:416:10)
>>     at Module.load (module.js:343:32)
>>     at Function.Module._load (module.js:300:12)
>>     at Function.Module.runMain (module.js:441:10)
>>     at startup (node.js:139:18)
>>     at node.js:968:3

Running tasks: package
Warning: Task "package" not found. Use --force to continue.

Aborted due to warnings.

Any inputs would be helpful.

Thanks Ravi

4
  • are you connected to internet ? "Unable to read CDN version, are you offline" Commented Jul 15, 2016 at 15:57
  • You probably shouldn't rely on a CDN for local development and also Task "package" not found Commented Jul 15, 2016 at 15:59
  • @Raghuveer I'm connected to internet Commented Jul 15, 2016 at 16:27
  • You probably did't remember to switch to the correct branch...this is what i forgot. Commented Oct 21, 2016 at 22:43

2 Answers 2

3

You should set environment variable NG1_BUILD_NO_REMOTE_VERSION_REQUESTS at first. For example, in Windows:

set NG1_BUILD_NO_REMOTE_VERSION_REQUESTS=1
Sign up to request clarification or add additional context in comments.

Comments

1

I also met this problem like this:

CDN version (remote): No version found. Current version (remote): v1.5.7 Loading "Gruntfile.js" tasks...ERROR
>> Error: Unable to read CDN version, are you offline or has the CDN not been properly pushed? Warning: Task "package" not found. Use
--force to continue.

Aborted due to warnings.

I checked the angular's source code ,Found in the 'Gruntfile.js' ,line20 it throw the Error

Unable to read CDN version, are you offline or has the CDN not been properly pushed?

, so comment this code to solve your problem.

  //if (versionInfo.cdnVersion == null) {
  //  throw new Error('Unable to read CDN version, are you offline or has the CDN not been properly pushed?');
  //}

this can make the building success.

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.