How to diagnose module error in terminal? - amazon-web-services

I am currently trying to create a new Alexa skill through the Amazon ask-cli, and I am running into an issue with a seemingly simple task. When I run ask init, I get the following error in terminal:
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/ask-cli/node_modules/dtrace-provider/dtrace-provider.js:18:23)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/ask-cli/node_modules/bunyan/lib/bunyan.js:79:18)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32) code: 'MODULE_NOT_FOUND' }
I suppose this means I need to install something via npm, but am not able to find a package called DTraceProviderBindings. I installed dtrace-provider, but still get the same error when I try to run ask init. So how can I diagnose and solve this, and other problems like it?

Related

While starting ember server I'm getting this error like SyntaxError: Unexpected identifier async postBuild()

While starting ember server I'm getting this error
What could be the reason for this error?
Unexpected identifier
/Users/chraju/Desktop/sites/blog-front-end/node_modules/ember-cli-typescript/js/addon.js:47
async postBuild() {
^^^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
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)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/chraju/Desktop/sites/blog-front-end/node_modules/ember-cli-typescript/index.js:9:20)
update node
nvm install 8.11.1
use the updated version
nvm use 8.11.1
in package.json update ember-cli version
"ember-cli": "2.13.3"
remove node module and run
rm -rf node_modules
npm install
ember s
working fine now

AWS Elastic Beanstalk invalid ELF Handler

I have been working on migrating a project from Heroku to AWS. I have been able to successfully upload the project onto AWS without any errors, however the applications health is listed as 'Degraded'. I have been reviewing my application logs and believe the issue has something to do with me writing the code on a Mac and then Elastic Beanstalk using a Linux AMI.
"invalid ELF header" when using the nodejs "ref" module on AWS Lambda
However, this post only diagnoses the issue. There is no solution provided. I am aware that there is an architectural mismatch when moving the code from Mac to Linux. I am looking for a solution to that problem.
Here are the error messages in my applications logs:
Error: /var/app/current/node_modules/bcrypt/lib/binding/bcrypt_lib.node: invalid ELF header
at Object.Module._extensions..node (internal/modules/cjs/loader.js:730:18)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/var/app/current/node_modules/bcrypt/bcrypt.js:6:16)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! beer#0.1.0 start: `node server/server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the beer#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/.npm/_logs/2019-04-15T00_54_06_983Z-debug.log

Meteor 1.4.4.1 issues running on AWS Beanstalk

After upgrading to Meteor 1.4.1.1 I can run my Meteor app without issues locally, but once uploaded to AWS Beanstalk, I am getting the error below. Any help greatly appreciated. (Uninstalling/ReInstalling Meteor did no help). I am using meteor build --server-only ../build --architecture os.linux.x86_64 command to build on Windows if that matters and then deploying to AWS Linux instances.
Error: Cannot find module 'fibers'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/var/app/current/programs/server/boot.js:1:75)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
npm ERR! Linux 4.4.51-40.60.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v7.6.0-linux-
x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v7.6.0-linux-
x64/bin/npm" "start"
npm ERR! node v7.6.0
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE

Error while installing ember cli app

i'm trying to install fresh cloned ember-cli app and getting this error.
Cannot find module 'ember-cli/lib/broccoli/get-ember-app' Error: Cannot find module 'ember-cli/lib/broccoli/get-ember-app'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/dudasupport/duda3/DudaRoot/client/src/dashboard/Brocfile.js:2:11)
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 Module.require (module.js:353:17)
at require (internal/module.js:12:17)
Ember-cli is installed in node_modules but and broccoli directory presents there but there is no get-ember-app file. What can cause this?

forked ember npm run build fails

I cannot seem to build ember.js on my system (mac osx Yosemite node v0.11.14 npm 2.0.0
. npm install works but npm run build produces the following output:
Cannot find module './build/Release/shell'
Error: Cannot find module './build/Release/shell'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/stockn/ember.js/node_modules/ember-cli-yuidoc/node_modules/execSync/index.js:30:11)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/stockn/ember.js/node_modules/ember-cli-yuidoc/lib/commands/yuidoc.js:3:19)
Turns out the version of node was the problem. I installed node version manager https://github.com/creationix/nvm then ran
nvm install 0.10.26
now npm run build runs successfully.