Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unexpected "export" statement in ES module "PlatformLogMiddlewareSettings.js" #2795

Closed
Bugslive opened this issue Aug 26, 2024 · 7 comments
Assignees

Comments

@Bugslive
Copy link

Describe the bug

Failed to run application.
Ouput:
`> npm start
.....
(node:69028) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
[2024-08-26T15:55:17.887] [ERROR] [TSED] - /local_project/node_modules/@tsed/platform-log-middleware/lib/esm/index.js:4
export * from "./domain/PlatformLogMiddlewareSettings.js";
^^^^^^

SyntaxError: Unexpected token 'export'
at wrapSafe (node:internal/modules/cjs/loader:1383:18)
at Module._compile (node:internal/modules/cjs/loader:1412:20)
at Module._compile (/local_project/node_modules/source-map-support/source-map-support.js:568:25)
at Module._extensions..js (node:internal/modules/cjs/loader:1551:10)
at require.extensions..jsx.require.extensions..js (/private/var/folders/yv/gs10n_bd0q174_2v9_f3jjdw0000gn/T/ts-node-dev-hook-3104628146421098.js:114:20)
at Object.nodeDevHook [as .js] (/local_project/node_modules/ts-node-dev/lib/hook.js:63:13)
at Module.load (node:internal/modules/cjs/loader:1282:32)
at Function.Module._load (node:internal/modules/cjs/loader:1098:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)`

To Reproduce

  1. Update Ts.ED to 7.80.X
  2. Run your application

Expected behavior

Application should start and be able to handle requests.

Code snippets

No response

Repository URL example

No response

OS

macOS

Node version

Node v22.4.1

Library version

v7.80.x

Additional context

No response

@raphaelvserafim
Copy link

I have the same error

@tsedio tsedio deleted a comment Aug 26, 2024
@Romakita
Copy link
Collaborator

Romakita commented Aug 26, 2024

@Bugslive You have a project under commonjs ?

@Romakita
Copy link
Collaborator

Ok found issue. Something has changed on the build tooling and package.json with expected type isn't generated. I'll fix that.

Romakita added a commit that referenced this issue Aug 26, 2024
Romakita added a commit that referenced this issue Aug 26, 2024
Copy link

🎉 Are you happy?

If you appreciated the support, know that it is free and is carried out on personal time ;)

A support, even a little bit makes a difference for me and continues to bring you answers!

github opencollective

@Romakita
Copy link
Collaborator

🎉 This issue has been resolved in version 7.80.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Romakita
Copy link
Collaborator

@Bugslive it's fixed ;)

@Bugslive
Copy link
Author

Thank you @Romakita. Have a good day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants