#Importing external packages
1 messages · Page 1 of 1 (latest)
export * from './src/Events/EventsInterface';
in my EventInterface.ts
export const EVENT = {
JOIN_QUEUE_R: 'JOIN_QUEUE',
LEAVE_QUEUE_R: 'LEAVE_QUEUE',
} as const;
export type EVENT_TYPES = typeof EVENT[keyof typeof EVENT];
so it's my external package
in my nest application i have a gateway :
/* eslint-disable prettier/prettier */
import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets';
import { EVENT } from '@TRPI/core-nt';
@WebSocketGateway({ namespace: 'mm-ranked' })
export class MmRankedGateway {
@SubscribeMessage(EVENT.JOIN_QUEUE_R)
handleMessage(client: any, payload: any){
console.log('mm-ranked: Join ranked queue', payload);
}
}
for now all is good
but when i start the application :
[22:04:18] Starting compilation in watch mode...
[22:04:23] Found 0 errors. Watching for file changes.
C:\Users\elhil\OneDrive\Documents\Université\Code-U\ProjetIntegrateur\TRPI\apps\backend\node_modules\@TRPI\core-nt\index.ts:1
export * from './src/Events/EventsInterface';
^^^^^^
SyntaxError: Unexpected token 'export'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1166:20)
at Module._compile (node:internal/modules/cjs/loader:1210:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1300:10)
at Module.load (node:internal/modules/cjs/loader:1103:32)
at Function.Module._load (node:internal/modules/cjs/loader:942:12)
at Module.require (node:internal/modules/cjs/loader:1127:19)
at require (node:internal/modules/helpers:112:18)
at Object.<anonymous> (C:\Users\elhil\OneDrive\Documents\Université\Code-U\ProjetIntegrateur\TRPI\apps\backend\src\mm-ranked\mm-ranked.gateway.ts:3:1)
at Module._compile (node:internal/modules/cjs/loader:1246:14)
I'm working in a turbo monorepo
can some one help me here ?
@ionic wigeon did you find a solution?
Thanks'