question-mark
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.

Proposal - require dependency directly from databases instead of use `Store.use`

See original GitHub issue

Proposal

require dependency directly from databases instead of use Store.use

For example: aws = require('aws-sdk); instead of aws = Store.use(‘aws-sdk’); I propose this idea because I have some issues.

Background

I using AWS Lambda with serverless and serverless-webpack I want to use eventstore with dynamodb from lambda but I got some errors. btw, I’ve installed aws-sdk and works on my local.

1. Implementation for db \"dynamodb\" does not exist!.

my code:

import eventstore from 'eventstore';
eventstore({ type: 'dynamodb' });

then I tried pass the DynamoDB class to eventstore, but I got another error Cannot find module 'aws-sdk' from parent my code:

import eventstore from 'eventstore';
import DynamoDB from 'eventstore/lib/databases/dynamodb';
eventstore({ type: DynamoDB });

Some of my thoughts

About the issue 1 and 2. I think it’s because it cannot find modules via require after webpack bundled. https://github.com/adrai/node-eventstore/blob/master/index.js#L42 https://github.com/adrai/node-eventstore/blob/master/lib/databases/dynamodb.js#L2 https://github.com/adrai/node-eventstore/blob/master/lib/base.js#L172

So, that’s why I propose this idea.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:20 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
eugenio79commented, Jan 29, 2019

I had a similar problem with eventstore and it got solved by using webpack-node-externals.

1reaction
jacklam718commented, Feb 22, 2018

btw, finally I solved the issue by using babel because babel only do transpile.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sp_depends (Transact-SQL) - SQL Server - Microsoft Learn
Requires membership in the public role. Examples. A. Listing dependencies on a table. The following example lists the database objects that depend on...
Read more >
Dependency management | Software supply chain security
Each dependency can have its own direct and indirect dependencies, creating a recursive tree of transitive dependencies that all impact the application.
Read more >
Identify dependencies - AWS Prescriptive Guidance
You start by identifying application and database dependencies, by asking questions such as the following: Is this database directly accessed by any other ......
Read more >
Where Is that Table Used? - Erland Sommarskog
While sys.sql_dependencies is deprecated, I still find it worthwhile to explore what it can offer. The query below gives you all dependencies in ......
Read more >
Chapter 13 Database Development Process
We can use the waterfall process as a means of identifying the tasks that are ... a database, rather than within every user...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found