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

Fix errors path #437

Merged
merged 1 commit into from
Aug 10, 2021
Merged

Fix errors path #437

merged 1 commit into from
Aug 10, 2021

Conversation

bodymindarts
Copy link
Member

@bodymindarts bodymindarts commented Aug 10, 2021

Context from Slack

"A bug has been pushed to testnet, that's why testnet deploy is failing. All our graphql related pods are failing.
This is the error -"

Error: Cannot find module '@domain//errors'
Require stack:
- /app/lib/services/mongoose/invoices.js
- /app/lib/core/lightning/index.js
- /app/lib/core/lightning/wallet.js
- /app/lib/core/wallet-factory.js
- /app/lib/servers/exporter.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/app/lib/services/mongoose/invoices.js:4:18)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/app/lib/core/lightning/index.js:13:20)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/app/lib/services/mongoose/invoices.js',
'/app/lib/core/lightning/index.js',
'/app/lib/core/lightning/wallet.js',
'/app/lib/core/wallet-factory.js',
'/app/lib/servers/exporter.js'
]
}

@krtk6160 krtk6160 merged commit 4a2392f into main Aug 10, 2021
@@ -1,4 +1,4 @@
import { UnknownRepositoryError, CouldNotFindError } from "@domain//errors"
Copy link
Contributor

@vindard vindard Aug 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably add a linting rule to catch this

I found this related issue that says that the "import/no-useless-path-segments" rule can fix this. When I tried it though, it worked for absolute imports (e.g. ".//schema" got linted). It didn't work for mapped imports though because the double // seems to resolve correctly in the checks but doesn't compile correctly when we build?

Screenshot from 2021-08-10 10-16-05

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

Successfully merging this pull request may close these issues.

3 participants