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.

Upgrading to 3.7.0

See original GitHub issue

I’m having a bit of trouble upgrading to latest (after esm/cjs changes), some of my tests (ts-jest) now fail with:

 /Users/mati/xxx/node_modules/fastify-decorators/testing/index.js:8
    export { configureControllerTest, } from './configure-controller-test.js';
    ^^^^^^

    SyntaxError: Unexpected token 'export'

    > 1 | import { configureServiceTest } from 'fastify-decorators/testing';

Linting tests also fails:

/Users/mati/xxx/tests/unit/yyyy/services/zzz.service.spec.ts
  1:1   error    Resolve error: Cannot find module '/Users/mati/xxx/node_modules/fastify-decorators/testing/index.cjs'
    at createEsmNotFoundErr (internal/modules/cjs/loader.js:907:15)
    at finalizeEsmResolution (internal/modules/cjs/loader.js:900:15)
    at resolveExports (internal/modules/cjs/loader.js:432:14)
    at Function.Module._findPath (internal/modules/cjs/loader.js:472:31)
    at findModulePath (/Users/mati/xxx/node_modules/eslint-import-resolver-alias/index.js:99:27)
    at Object.exports.resolve (/Users/mati/xxx/node_modules/eslint-import-resolver-alias/index.js:75:10)
    at v2 (/Users/mati/xxx/node_modules/eslint-module-utils/resolve.js:117:23)
    at withResolver (/Users/mati/xxx/node_modules/eslint-module-utils/resolve.js:122:16)
    at fullResolve (/Users/mati/xxx/node_modules/eslint-module-utils/resolve.js:139:22)
    at relative (/Users/mati/xxx/node_modules/eslint-module-utils/resolve.js:84:10)  import/namespace

I’m not entirely sure what needs to be changed here… Any help will be appreciated.


Update:

Might not be related, but in package.json I can see

    "./testing": {
      "import": "./testing/index.js",
      "require": "./testing/index.cjs"
    }

however, there is no index.cjs present…

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
unematiiicommented, Dec 27, 2020

I think this can be closed now

1reaction
L2jLigacommented, Dec 17, 2020

Here’s PR about adding support for TS + ESM: https://github.com/facebook/jest/pull/10823, it’s already merged but I didn’t managed how to make it work yet, for a while I added section to documentation about configuring Jest

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Release Python 3.7.0
Python 3.7.0. Release Date: June 27, 2018. Note: The release you are looking at is Python 3.7.0, the initial feature release for the...
Read more >
How to upgrade to python 3.7 on Ubuntu 18.10 - isw blog
Upgrade Python 3.7 · Step 1: Install the Python 3.7 package using apt-get · Step 2: Add Python 3.6 & Python 3.7 to...
Read more >
python - DEV Community ‍ ‍
How to Update Python How to Upgrade to Python 3.7 on Ubuntu 18.04/18.10 · Step 0: Check the current python version · Step...
Read more >
3.7.0 Upgrade Guide · nextgenhealthcare/connect Wiki - GitHub
If you are upgrading from a previous version nothing will change, your keystore and passwords will remain the same.
Read more >
PowerFlex Manager: How to upgrade to version 3.7.0 using ...
Summary: PowerFlex Manager (PFxM) 3.7.0 has introduced filesystem sizing changes on the appliance. For all customers to get these changes, we ...
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