Cannot find module
When I try to import modules, I get this error. I have confirmed that the package.json has the required modules and there is a node_modules directory with the required module. Any suggestions on what else I should be looking for?
I've never used webpack before (just gulp-typescript).
I've installed arangojs but I'm still getting a runtime error:
Cannot find module 'arangojs'
Since I first posted this, I've been able to run without the module error in the local test, lambda:run, express server. I've also created a new sample project that demonstrates the issue. It must have something to do with the type of module or it's typescript declaration for arangojs. I've also duplicated this problem with the axios library.
import { Handler } from 'aws-lambda';
import { Database } from 'arangojs';
const func: Handler = async (event, context) => {
const db = new Database(event.arangoDB.serverName);
console.log('db:', db);
return event;
};
export default func;