Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Cannot find module 'index' #1

Open
jinho-scenappsm opened this issue May 19, 2016 · 4 comments
Open

Cannot find module 'index' #1

jinho-scenappsm opened this issue May 19, 2016 · 4 comments

Comments

@jinho-scenappsm
Copy link

I installed dino on my centos 7 today.
And I tested with below script, but no luck.


./dino run -k -n 200 -c 10 -l 7 -t http://.../api/test

                      _._
                    _/:|:
                   /||||||.
                   ||||||||.
                  /|||||||||:

_ _ /|||||||||||
| ||___ ___ .|||||||||||||
| . | | | . | | ||||||||||||:
|||||_| /| |||||||||||||:=---.._
| | |||||:'''':|| '-._ '-.
/| | ||' '-. _: ;
| | | ' '~~ _;
| ' .=. _-

.~ { '-'
.--=.-~ .. { }
.-~ @-, { '-. _. '==+ |
(' } _ _.=
| |
=======' /_ ~-_ ) <_oo_> -----~~/ /'===...===' + /
<oo> / //
/ //
<oo>

Expecting to make up to 14000 requests
{ StatusCode: 200,
FunctionError: 'Unhandled',
LogResult: 'U1RBUlQgUmVxdWVzdElkOiBkNDE4MDNlYy0xZDg4LTExZTYtOWQxYS0yZGZiN2EyOTgwZGYgVmVyc2lvbjogJExBVEVTVApVbmFibGUgdG8gaW1wb3J0IG1vZHVsZSAnaW5kZXgnOiBFcnJvcgogICAgYXQgRnVuY3Rpb24uTW9kdWxlLl9yZXNvbHZlRmlsZW5hbWUgKG1vZHVsZS5qczozMzg6MTUpCiAgICBhdCBGdW5jdGlvbi5Nb2R1bGUuX2xvYWQgKG1vZHVsZS5qczoyODA6MjUpCiAgICBhdCBNb2R1bGUucmVxdWlyZSAobW9kdWxlLmpzOjM2NDoxNykKICAgIGF0IHJlcXVpcmUgKG1vZHVsZS5qczozODA6MTcpCkVORCBSZXF1ZXN0SWQ6IGQ0MTgwM2VjLTFkODgtMTFlNi05ZDFhLTJkZmI3YTI5ODBkZgpSRVBPUlQgUmVxdWVzdElkOiBkNDE4MDNlYy0xZDg4LTExZTYtOWQxYS0yZGZiN2EyOTgwZGYJRHVyYXRpb246IDAuNDggbXMJQmlsbGVkIER1cmF0aW9uOiAxMDAgbXMgCU1lbW9yeSBTaXplOiA1MTIgTUIJTWF4IE1lbW9yeSBVc2VkOiAxNyBNQgkK',
Payload: '{"errorMessage":"Cannot find module 'index'","errorType":"Error","stackTrace":["Function.Module._resolveFilename (module.js:338:15)","Function.Module._load (module.js:280:25)","Module.require (module.js:364:17)","require (module.js:380:17)"]}' }
START RequestId: d41803ec-1d88-11e6-9d1a-2dfb7a2980df Version: $LATEST
Unable to import module 'index': Error
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
END RequestId: d41803ec-1d88-11e6-9d1a-2dfb7a2980df
REPORT RequestId: d41803ec-1d88-11e6-9d1a-2dfb7a2980df Duration: 0.48 ms Billed Duration: 100 ms Memory Size: 512 MB Max Memory Used: 17 MB

/usr/local/lib/node_modules/artillery-dino/node_modules/aws-sdk/lib/request.js:30
throw err;
^

Error
at Response. (/usr/local/lib/node_modules/artillery-dino/lib/commands/run.js:180:15)
at Request. (/usr/local/lib/node_modules/artillery-dino/node_modules/aws-sdk/lib/request.js:354:18)
at Request.callListeners (/usr/local/lib/node_modules/artillery-dino/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/usr/local/lib/node_modules/artillery-dino/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/usr/local/lib/node_modules/artillery-dino/node_modules/aws-sdk/lib/request.js:596:14)
at Request.transition (/usr/local/lib/node_modules/artillery-dino/node_modules/aws-sdk/lib/request.js:21:10)
at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/artillery-dino/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /usr/local/lib/node_modules/artillery-dino/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/usr/local/lib/node_modules/artillery-dino/node_modules/aws-sdk/lib/request.js:37:9)
at Request. (/usr/local/lib/node_modules/artillery-dino/node_modules/aws-sdk/lib/request.js:598:12)

@ndmgrphc
Copy link

ndmgrphc commented Jul 5, 2016

Getting the exact same error on OSX 10.9.5.

@ndmgrphc
Copy link

ndmgrphc commented Jul 6, 2016

lambda.zip is structured wrong. Solved this issue by decompressing lambda.zip and recompressing the contents rather than their parent directory. In osx, this will result in an archive named Archive.zip. Lambda (no longer?) does not accept zip archives where the root item is a directory as it would be if you (built the app iin ./lambda and) zipped ./lambda.

tl;dr don't zip ./lambda, zip ./lambda/*

Working on a fork, now.

@hayd
Copy link

hayd commented Sep 10, 2016

@ndmgrphc which fork (I can't see one on the github network)?

Have you been using dino successfully?

@roh26it
Copy link

roh26it commented Nov 9, 2016

Agree with @ndmgrphc . Was able to run Dino successfully after decompress and recompressing the contents and then uploading it to the Lambda function manually.

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

No branches or pull requests

4 participants