The Feathersjs Express Docs stated that the Router object is exposed from the @feathersjs/express package
Actual behavior
importing the Router object brings errors.
import express, { Router } from '@feathersjs/express'
^^^^^^
SyntaxError: Named export 'Router' not found. The requested module '@feathersjs/express' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@feathersjs/express';
const { Router } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
Node.js v18.17.1
Also, looking at the source code, it does not export the Router object
System configuration
Module versions (especially the part that's not working):
"@feathersjs/express": "5.0.11",
"@feathersjs/feathers": "5.0.11",
Steps to reproduce
Stackblitz Link showing a sample of the problem
Expected behavior
The Feathersjs Express Docs stated that the
Router
object is exposed from the@feathersjs/express
packageActual behavior
importing the
Router
object brings errors.Also, looking at the source code, it does not export the
Router
objectSystem configuration
Module versions (especially the part that's not working): "@feathersjs/express": "5.0.11", "@feathersjs/feathers": "5.0.11",
NodeJS version: Node.js v18.17.1
Operating System: Windows
Browser Version:
React Native Version:
Module Loader: