jaredwray / cache-manager

Cache module for Node.JS
MIT License
1.4k stars 152 forks source link

Receiving error `SyntaxError: Unexpected token 'export'` with v5.6.0 #704

Closed AbhishekTaparia closed 1 month ago

AbhishekTaparia commented 1 month ago

Describe the bug I was trying to upgrade the package version in my NestJS application. And I received this error on app initialisation.

export * from './caching.js';
^^^^^^

SyntaxError: Unexpected token 'export'
    at wrapSafe (node:internal/modules/cjs/loader:1281:20)
    at Module._compile (node:internal/modules/cjs/loader:1321:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1024:12)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
jaredwray commented 1 month ago

What version of nodejs are you on?

jaredwray commented 1 month ago

Also, what version of nestjs?

devzgabriel commented 1 month ago

image

I'm receveing this error too, using nestjs following its documentation

devzgabriel commented 1 month ago

Also, what version of nestjs?

"@nestjs/cache-manager": "^2.1.0", "cache-manager": "^5.2.3", "cache-manager-redis-store": "^2.0.0", "@nestjs/common": "^10.0.0",

jaredwray commented 1 month ago

We are working on a fix for this

jaredwray commented 1 month ago

@AbhishekTaparia @devzgabriel please check as we updated the package to be commonjs and on version 5.7.1

moekify commented 2 weeks ago

@jaredwray When are you releasing 5.7.1?

jaredwray commented 2 weeks ago

@moekify - 5.7.1 has been released today. Thanks for the patience on this.