amazon-archives / aws-cognito-angular-quickstart

An Angular(v5)-based QuickStart single-page app utilizing Amazon Cognito, S3, and DynamoDB (Serverless architecture)
https://cognito.budilov.com
Apache License 2.0
689 stars 304 forks source link

Elastic Beanstalk deploy failing on `npm owner ls` #68

Closed snuffub closed 7 years ago

snuffub commented 7 years ago

I'm not the sharpest knife in the drawer, it's failing because it's not recognizing the Angular CLI command ng. the npm owner ls command was just it trying to provide me with a helpful contact for the original build failure.

Now to figure out why ng either isn't getting installed or isn't added to the path...

Original issue preserved below for posterity


When I try deploying to elastic beanstalk I'm getting a failure because the 'npm owner ls aws-cognito-angular2-quickstart' command is failing:

npm ERR! owner ls Couldn't get owner data aws-cognito-angular2-quickstart npm ERR! Linux 4.4.0-43-Microsoft npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "owner" "ls" "aws-cognito-angular2-quickstart" npm ERR! node v6.10.2 npm ERR! npm v3.10.10 npm ERR! code E404

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/aws-cognito-angular2-quickstart npm ERR! 404 npm ERR! 404 'aws-cognito-angular2-quickstart' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request: npm ERR! /home/unixuser/cognito_sample/aws-cognito-angular2-quickstart/aws/npm-debug.log

Full npm-debug.log below:

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/nodejs', 1 verbose cli '/usr/bin/npm', 1 verbose cli 'owner', 1 verbose cli 'ls', 1 verbose cli 'aws-cognito-angular2-quickstart' ] 2 info using npm@3.10.10 3 info using node@v6.10.2 4 silly mapToRegistry name aws-cognito-angular2-quickstart 5 silly mapToRegistry using default registry 6 silly mapToRegistry registry https://registry.npmjs.org/ 7 silly mapToRegistry data Result { 7 silly mapToRegistry raw: 'aws-cognito-angular2-quickstart', 7 silly mapToRegistry scope: null, 7 silly mapToRegistry escapedName: 'aws-cognito-angular2-quickstart', 7 silly mapToRegistry name: 'aws-cognito-angular2-quickstart', 7 silly mapToRegistry rawSpec: '', 7 silly mapToRegistry spec: 'latest', 7 silly mapToRegistry type: 'tag' } 8 silly mapToRegistry uri https://registry.npmjs.org/aws-cognito-angular2-quickstart 9 verbose request uri https://registry.npmjs.org/aws-cognito-angular2-quickstart 10 verbose request no auth needed 11 info attempt registry request try #1 at 1:35:53 PM 12 verbose request id d67b9bc96b951c5a 13 http request GET https://registry.npmjs.org/aws-cognito-angular2-quickstart 14 http 404 https://registry.npmjs.org/aws-cognito-angular2-quickstart 15 verbose headers { 'content-type': 'application/json', 15 verbose headers 'cache-control': 'max-age=0', 15 verbose headers 'content-length': '2', 15 verbose headers 'accept-ranges': 'bytes', 15 verbose headers date: 'Wed, 12 Apr 2017 18:35:56 GMT', 15 verbose headers via: '1.1 varnish', 15 verbose headers age: '0', 15 verbose headers connection: 'keep-alive', 15 verbose headers 'x-served-by': 'cache-jfk8139-JFK', 15 verbose headers 'x-cache': 'MISS', 15 verbose headers 'x-cache-hits': '0', 15 verbose headers 'x-timer': 'S1492022156.133509,VS0,VE325', 15 verbose headers vary: 'Accept-Encoding' } 16 silly get cb [ 404, 16 silly get { 'content-type': 'application/json', 16 silly get 'cache-control': 'max-age=0', 16 silly get 'content-length': '2', 16 silly get 'accept-ranges': 'bytes', 16 silly get date: 'Wed, 12 Apr 2017 18:35:56 GMT', 16 silly get via: '1.1 varnish', 16 silly get age: '0', 16 silly get connection: 'keep-alive', 16 silly get 'x-served-by': 'cache-jfk8139-JFK', 16 silly get 'x-cache': 'MISS', 16 silly get 'x-cache-hits': '0', 16 silly get 'x-timer': 'S1492022156.133509,VS0,VE325', 16 silly get vary: 'Accept-Encoding' } ] 17 error owner ls Couldn't get owner data aws-cognito-angular2-quickstart 18 verbose stack Error: Registry returned 404 for GET on https://registry.npmjs.org/aws-cognito-angular2-quickstart 18 verbose stack at makeError (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:302:12) 18 verbose stack at CachingRegistryClient. (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:280:14) 18 verbose stack at Request._callback (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:210:14) 18 verbose stack at Request.self.callback (/usr/lib/node_modules/npm/node_modules/request/request.js:187:22) 18 verbose stack at emitTwo (events.js:106:13) 18 verbose stack at Request.emit (events.js:191:7) 18 verbose stack at Request. (/usr/lib/node_modules/npm/node_modules/request/request.js:1048:10) 18 verbose stack at emitOne (events.js:96:13) 18 verbose stack at Request.emit (events.js:188:7) 18 verbose stack at IncomingMessage. (/usr/lib/node_modules/npm/node_modules/request/request.js:969:12) 19 verbose statusCode 404 20 verbose pkgid aws-cognito-angular2-quickstart 21 verbose cwd /home/unixuser/cognito_sample/aws-cognito-angular2-quickstart/aws 22 error Linux 4.4.0-43-Microsoft 23 error argv "/usr/bin/nodejs" "/usr/bin/npm" "owner" "ls" "aws-cognito-angular2-quickstart" 24 error node v6.10.2 25 error npm v3.10.10 26 error code E404 27 error 404 Registry returned 404 for GET on https://registry.npmjs.org/aws-cognito-angular2-quickstart 28 error 404 29 error 404 'aws-cognito-angular2-quickstart' is not in the npm registry. 30 error 404 You should bug the author to publish it (or use the name yourself!) 31 error 404 Note that you can also install from a 32 error 404 tarball, folder, http url, or git url. 33 verbose exit [ 1, true ]

I believe it's getting called by npm run build from the build-angular.config file, but I'm still trying to figure out why it's getting called and if I should just be changing the package name to something I own.

Thanks for the help!

snuffub commented 7 years ago

I resolved the issue by adding @Angular/cli and @Angular/compiler-cli to the package.json dependencies list from DevDependencies.

I'm just coming up to speed on Angular, NPM, and elastic beanstalk so I'm not sure if this is an issue that's specific to my environment or something that others will run into.

vbudilov commented 7 years ago

@snuffub ,

First I see this error. Did you install angular cli beforehand?

snuffub commented 7 years ago

I installed angular CLI Localy, but I think the EB deploy script needs it on the EC2 instance to deploy.