Skip to content

ch: add eslint disable comment to handle import error#456

Open
acedeywin wants to merge 1 commit intomasterfrom
fx-khp-data-pull-error
Open

ch: add eslint disable comment to handle import error#456
acedeywin wants to merge 1 commit intomasterfrom
fx-khp-data-pull-error

Conversation

@acedeywin
Copy link
Contributor

Description

Bug fix: HRM exports aren’t being posted to S3 for six hours.
Cause:

> cd dist && node ./bin/khpDataPull 
node:internal/modules/cjs/loader:435
throw err;
^
Error: Cannot find module '/home/node/node_modules/@tech-matters/s3-client/dist/index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:427:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:640:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1014:27)
    at Function.Module._load (node:internal/modules/cjs/loader:873:27)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/home/node/dist/data-pull-task/khp-data-pull-task/pull-cases.js:47:21)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32) {
  code: 'MODULE_NOT_FOUND',
  path: '/home/node/node_modules/@tech-matters/s3-client/package.json',
  requestPath: '@tech-matters/s3-client'
}

Solution was to add // eslint-disable-next-line import/no-extraneous-dependencies comment in other to allow @tech-matters/s3-client/dist build properly

Checklist

  • Corresponding issue has been opened
  • New tests added

Related Issues

Fixes #....

Verification steps

Copy link
Collaborator

@stephenhand stephenhand left a comment

Choose a reason for hiding this comment

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

Do we know why these are being considered 'extraneous dependencies' by eslint for the HRM service?

Normally this happens when you try to use a dev dependency in production code, but the package is in package.json. Also my eslint is not reporting a problem

Before we merge this we should deploy it to staging from this branch to see if it fixes the issue

Be sure to co-ordinate with Annalise over when to deploy as she will be regression testing the new release over the next few days

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.

2 participants