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

serverless is broken badly #8225

Closed
vagarwal77 opened this issue Sep 11, 2020 · 7 comments
Closed

serverless is broken badly #8225

vagarwal77 opened this issue Sep 11, 2020 · 7 comments

Comments

@vagarwal77
Copy link

Seems like, serverless is broken badly :-

[vagarwal@ConcertoHealth.AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ sudo npm install -g serverless@~1.62.0
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
/usr/bin/serverless -> /usr/lib/node_modules/serverless/bin/serverless.js
/usr/bin/slss -> /usr/lib/node_modules/serverless/bin/serverless.js
/usr/bin/sls -> /usr/lib/node_modules/serverless/bin/serverless.js

serverless@1.62.0 postinstall /usr/lib/node_modules/serverless
node ./scripts/postinstall.js

module.js:478
throw err;
^

Error: Cannot find module 'boxen'
at Function.Module._resolveFilename (module.js:476:15)
at Function.Module._load (module.js:424:25)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/usr/lib/node_modules/serverless/scripts/postinstall.js:3:15)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
/usr/lib
└── (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/serverless/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm ERR! Linux 4.14.186-146.268.amzn2.x86_64
npm ERR! argv "/usr/bin/node" "/bin/npm" "install" "-g" "serverless@~1.62.0"
npm ERR! node v6.17.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! serverless@1.62.0 postinstall: node ./scripts/postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serverless@1.62.0 postinstall script 'node ./scripts/postinstall.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the serverless package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./scripts/postinstall.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs serverless
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls serverless
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/vagarwal@ConcertoHealth.AI/fhir-works-on-aws-deployment/npm-debug.log
npm ERR! code 1

@gruckionvit
Copy link

Use npm to clear the cache then delete node_modules. Make sure you uninstall serverless if it is globally installed. Also turn your PC off and on again ;)

@medikoo
Copy link
Contributor

medikoo commented Sep 14, 2020

@vagarwal77 note that latest version of serverless is 2.0.0, your install command tries to install 1.62 which we no longer support

@vagarwal77
Copy link
Author

Followed all the below steps and rebooted and still problem persist -

[vagarwal@AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ npm cache clean
[vagarwal@AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ npm prune
unbuild ansi-regex@4.1.0
unbuild ansi-styles@4.2.1
unbuild boxen@4.2.0
unbuild camelcase@5.3.1
unbuild chalk@3.0.0
unbuild cli-boxes@2.2.1
unbuild color-convert@2.0.1
unbuild color-name@1.1.4
unbuild emoji-regex@7.0.3
unbuild has-flag@4.0.0
unbuild is-fullwidth-code-point@2.0.0
unbuild long@4.0.0
unbuild node.js@0.0.1-security
unbuild strip-ansi@5.2.0
unbuild term-size@2.2.0
unbuild @protobufjs/aspromise@1.1.2
unbuild @protobufjs/base64@1.1.2
unbuild @protobufjs/codegen@2.0.4
unbuild type-fest@0.8.1
unbuild widest-line@3.1.0
unbuild supports-color@7.2.0
unbuild @protobufjs/eventemitter@1.1.0
unbuild @protobufjs/fetch@1.1.0
unbuild @protobufjs/float@1.0.2
unbuild @protobufjs/inquire@1.1.0
unbuild @protobufjs/path@1.1.2
unbuild @protobufjs/pool@1.1.0
unbuild @protobufjs/utf8@1.1.0
unbuild @types/color-name@1.1.1
unbuild @types/long@4.0.1
unbuild ansi-align@3.0.0
unbuild string-width@4.2.0
unbuild protobufjs@6.10.1
[vagarwal@ConcertoHealth.AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$
[vagarwal@ConcertoHealth.AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ rm -rf node_modules/
[vagarwal@ConcertoHealth.AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ sudo npm uninstall -g serverless
[vagarwal@ConcertoHealth.AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ rm -f /usb/bin/serverless
[vagarwal@ConcertoHealth.AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ npm remove serverless
######Rebooted the AWS Linux EC2####
[vagarwal@AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ sudo npm install serverless -g
[sudo] password for vagarwal@ConcertoHealth.AI:
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see request/request#3142
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated @types/chalk@2.2.0: This is a stub types definition for chalk (https://github.com/chalk/chalk). chalk provides its own type definitions, so you don't need @types/chalk installed!
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/usr/bin/serverless -> /usr/lib/node_modules/serverless/bin/serverless.js
/usr/bin/sls -> /usr/lib/node_modules/serverless/bin/serverless.js

protobufjs@6.10.1 postinstall /usr/lib/node_modules/serverless/node_modules/protobufjs
node scripts/postinstall

module.js:478
throw err;
^

Error: Cannot find module '/usr/lib/node_modules/serverless/node_modules/protobufjs/scripts/postinstall'
at Function.Module._resolveFilename (module.js:476:15)
at Function.Module._load (module.js:424:25)
at Module.runMain (module.js:611:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:160:9)
at bootstrap_node.js:507:3
/usr/lib
└── (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/serverless/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm ERR! Linux 4.14.193-149.317.amzn2.x86_64
npm ERR! argv "/usr/bin/node" "/bin/npm" "install" "serverless" "-g"
npm ERR! node v6.17.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! protobufjs@6.10.1 postinstall: node scripts/postinstall
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protobufjs@6.10.1 postinstall script 'node scripts/postinstall'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the protobufjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/postinstall
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs protobufjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls protobufjs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/vagarwal@AI/fhir-works-on-aws-deployment/npm-debug.log
npm ERR! code 1

@vagarwal77
Copy link
Author

[vagarwal@ConcertoHealth.AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ node -v
v6.17.1
[vagarwal@ConcertoHealth.AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ npm -v
3.10.10

@vagarwal77
Copy link
Author

Updated all the version

[vagarwal@ConcertoHealth.AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ node -v
v14.10.1
[vagarwal@ConcertoHealth.AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ npm -v
6.14.8
[vagarwal@ConcertoHealth.AI@ip-10-164-1-105 fhir-works-on-aws-deployment]$ serverless
Serverless: Configuration warning:
Serverless: at 'resources.Resources.FHIRBinaryBucketHttpsOnlyPolicy.DependsOn': should be array
Serverless: at 'resources.Resources.DDBToESErrorAlarm.DependsOn': should be array
Serverless: at 'resources.Resources.FhirLambdaErrorAlarm.DependsOn': should be array
Serverless: at 'resources.Resources.FhirLambdaLatencyAlarm.DependsOn': should be array
Serverless: at 'resources.Resources.ApiGateway5XXErrorAlarm.DependsOn': should be array
Serverless: at 'resources.Resources.ApiGateway4XXErrorAlarm.DependsOn': should be array
Serverless: at 'resources.Resources.ApiGatewayLatencyAlarm.DependsOn': should be array
Serverless:
Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
Serverless:

Fetch Error --------------------------------------------

FetchError: request to https://api.serverless.com/core/meta failed, reason: read ECONNRESET
at ClientRequest. (/home/vagarwal@ConcertoHealth.AI/.nvm/versions/node/v14.10.1/lib/node_modules/serverless/node_modules/node-fetch/lib/index.js:1461:11)
at ClientRequest.emit (events.js:314:20)
at ClientRequest.EventEmitter.emit (domain.js:486:12)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:314:20)
at TLSSocket.EventEmitter.emit (domain.js:486:12)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com

Your Environment Information ---------------------------
Operating System: linux
Node Version: 14.10.1
Framework Version: 2.0.0
Plugin Version: 4.0.2
SDK Version: 2.3.2
Components Version: 3.1.2

@medikoo
Copy link
Contributor

medikoo commented Sep 15, 2020

@vagarwal77 thanks for update. From your logs I see two issues on our side:

  1. Just array notation is recognized for DependsOn in resources section, where also string should be supported (still note it's just warnings, they do not affect further processing of a command)
  2. Network error crashes the interactive CLI setup. While network error signals issue with your setup I think we should handle it gently or at least provide a more meaningful error (related issue: Report network errors meaningfully #7733)

@medikoo
Copy link
Contributor

medikoo commented Sep 15, 2020

(1) Fixed with #8233
(2) Handled at #7733 (please follow this issue on progress on that)

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

No branches or pull requests

3 participants