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

Error running with node v6.9.1; Cannot read property 'lastIndexOf' #205

Open
ivanwills opened this issue Dec 4, 2016 · 3 comments
Open

Comments

@ivanwills
Copy link

Hi,

When I try running plato with node v6.9.1 (LTS) I get the following error (no errors with node v4.4.4 though)

$ plato --dir .
/home/dev/.nvm/v6.9.1/lib/node_modules/plato/lib/util.js:15
  var lastSlash = files[0].lastIndexOf(path.sep);
                          ^

TypeError: Cannot read property 'lastIndexOf' of undefined
    at Object.exports.findCommonBase (/home/dev/.nvm/v6.9.1/lib/node_modules/plato/lib/util.js:15:27)
    at Object.exports.inspect (/home/dev/.nvm/v6.9.1/lib/node_modules/plato/lib/plato.js:87:29)
    at Object.exports.exec (/home/dev/.nvm/v6.9.1/lib/node_modules/plato/lib/cli.js:53:9)
    at Object.<anonymous> (/home/dev/.nvm/v6.9.1/lib/node_modules/plato/bin/plato:19:5)
    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.runMain (module.js:604:10)
@replete
Copy link

replete commented Jan 10, 2017

You are missing the input directory.
try: plato --dir ./plato-report-output ./

@seanohue
Copy link

seanohue commented Feb 1, 2017

Perhaps this could be resolved by showing a more user-friendly error message when there is no input directory specified?

@tddamith
Copy link

tddamith commented Jun 5, 2020

Hi,

When I try running 'sls invoke local -f hello ' I get the following error

Type Error ---------------------------------------------

TypeError: Cannot read property 'lastIndexOf' of undefined
at AwsInvokeLocal.invokeLocal (/usr/local/lib/node_modules/serverless/lib/plugins/aws/invokeLocal/index.js:180:45)
From previous event:
at Object.invoke:local:invoke [as hook] (/usr/local/lib/node_modules/serverless/lib/plugins/aws/invokeLocal/index.js:38:57)
at /usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:490:55
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:490:22)
at /usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:525:24
From previous event:
at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:525:8)
at /usr/local/lib/node_modules/serverless/lib/Serverless.js:133:33
From previous event:
at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:120:74)
at /usr/local/lib/node_modules/serverless/bin/serverless.js:80:26
at processImmediate (internal/timers.js:439:21)
at process.topLevelDomainCallback (domain.js:130:23)
From previous event:
at Object. (/usr/local/lib/node_modules/serverless/bin/serverless.js:80:4)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11

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

No branches or pull requests

4 participants