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.

[Dove] Drop reliance on legacy runtime compatibility settings

See original GitHub issue

Running the Quick Start with typescript defaults returns the following error when executed with tsc app.ts unless a tsconfig file is made and a handful of legacy compatibility features are turned on.

SyntaxError: The requested module '@feathersjs/koa' does not provide an export named 'bodyParser'

Reproduction: https://stackblitz.com/edit/node-lzf6x8?file=package.json,app.ts

Upon some debugging, body parser is not exported at top level… but in a property called default:

❯ tsx
Welcome to tsx v3.9.0 (Node.js v16.14.2).
Type ".help" for more information.
> import('@feathersjs/koa').then(console.log)
Promise { <unknown> }
> [Module: null prototype] {
  default: {
    Koa: [Getter],
    bodyParser: [Getter],
    koa: [Function: koa],
    parseAuthentication: [Getter],
    authenticate: [Getter],
    errorHandler: [Getter],
    formatter: [Getter],
    rest: [Getter]
  },
  __esModule: true,
  koa: [Function: koa],
  authenticate: [Function: authenticate],
  parseAuthentication: [Function: parseAuthentication],
  errorHandler: [Function: errorHandler],
  rest: [Function: rest],
  formatter: [Function: formatter]
}

Proposed Solutions:

  1. Use tsup to automatically wrap the typescript modules for cjs and esm import.
  2. Drop support for CommonJs projects in new versions and only build for ES modules

Workarounds

  1. Using esno
  2. manually pick and hunt for dependencies within the CJS package

Additional Notes

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dafflcommented, Sep 14, 2022

This looks like providing an ESM build which we’ve been trying to do in https://github.com/feathersjs/feathers/pull/2665 can’t seem to get it working properly in an at least somewhat backwards compatible way. I’d be happy if someone wants to take on digging more into this.

0reactions
FossPrimecommented, Oct 29, 2022

Note that the current Feathers memory has been moved into core as @feathersjs/memory. I just didn’t want to add deprecation notices yet since it’s not “official”.

I’m fairly sure it should build as expected.

A mail forwarding a dress would have saved a lot of time… Nothing hinted at work being done on somewhere else, there are dove branches there. A mail forwarding address would be nice 😉, even months before you move.

Vuetify is full of heads up notices… even though there is no stable up to date version, 20 months after Vue 3 became stable.

image

The repo, issue tickets and PR system need not be altogether… Those can be moved to the monorepo before this one is ready…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support Typescript 4.7 "Node16" extension requirements #8993
Runtime or Buildtime? This is going the Deno route, of requiring extensions in the imports, which always irked me, but I can learn....
Read more >
RPi - River Thames Conditions - Environment Agency - GOV.UK
Pre pro bono fellowship, Windows 8 compatible printers wireless? ... #Michel ordeman haarlem, Css based drop down list, The batter official ending, ...
Read more >
50bfl2114_12_dfu_ita.pdf - User Manual
consiglia di selezionare l'opzione Professional mode ... Per sapere dove inserire il codice PIN nel software ... C runtime library.
Read more >
AIX V6 Advanced Security Features - IBM Redbooks
1.8 Trusting the configuration of the OS with AIX Security Expert . ... the accuracy of performance, compatibility or any other claims related...
Read more >
Tech Trends 2019 - Deloitte
a mean-spirited worm called Stuxnet was changing the rules of ... modernizing legacy core systems, transforming the business of technology, and.
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