Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module if create with source and api-module parameters

See original GitHub issue

I use command claudia create --region us-east-1 --api-module lambda --source ./build/src, it throws error cannot find module build/src/lambda. The reason is create command use require(path.join(source, apiModule)) to find module, which will discard ‘.’.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

daronjonescommented, Jan 16, 2018

You may also get this error if you’ve put dependencies in the dev-dependencies with --save-dev.

I’m guessing that we should use the --no-optional-dependencies flag to get around this.

flyingskycommented, May 11, 2016

fixed. thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I resolve "Cannot find module" error using Node.js?
Using npm install installs the module into the current directory only (in a subdirectory called node_modules ). Is app.js located under ...
Read more >
CommonJS modules | Node.js v19.3.0 Documentation
In order to make modules available to the Node. js REPL, it might be useful to also add the /usr/lib/node_modules folder to the...
Read more >
Module Methods - webpack
This section covers all methods available in code compiled with webpack. When using webpack to bundle your application, you can pick from a...
Read more >
Modules | NestJS - A progressive Node.js framework
The @Module() decorator provides metadata that Nest makes use of to organize ... Nest uses to resolve module and provider relationships and dependencies....
Read more >
cannot find module 'process' or its corresponding type ...
If you just use the variable without an import statement, you get the error: Cannot find name 'process'. Do you need to install...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found