You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { Command } from '@node-ts/bus-messages';
SyntaxError: Named export 'Command' not found. The requested module '@nod
e-ts/bus-messages' is a CommonJS module, which may not support all module.exports as named exports.
I tried "type": "commonjs" instead "type": "module" in my package.json
import { Bus } from '@node-ts/bus-core';
SyntaxError: Cannot use import statement outside a module
What I can do to fix it ?
Thanks
Node.js v18.4.0 pnpm 7.4.1 TypeScript 4.7.4
The text was updated successfully, but these errors were encountered:
hi @rifton007, it's perhaps too late by now but it looked like you were importing @node-ts/bus-messages into an ES modules-based package. There's nothing specific about the bus-messages library - it's a commonjs module.
I don't yet have a plan to move the library to ES modules, though I may end up transpiling to both. For now your temporary solution seems to be the way to go.
Hello,
I tried to learn @node-ts/bus, but I can't import anything.
I want just to reproduce this https://bus.node-ts.com/installing/handling-messages
I tried
"type": "commonjs"
instead"type": "module"
inmy package.json
What I can do to fix it ?
Thanks
Node.js v18.4.0
pnpm 7.4.1
TypeScript 4.7.4
The text was updated successfully, but these errors were encountered: