Open hakimscode opened 4 weeks ago
Well, I figured it out. It turns out there is a mistake in import script. It should import like this
import { Pulse } from '@pulsecron/pulse';
Are you using JavaScript or Typescript?
@code-xhyun I'm using Typescript
@hakimscode I haven't encountered the same issue, so could you please provide me with your tsconfig file and the version of Pulse you're using?
@code-xhyun Sure,
I'm using "@pulsecron/pulse": "^1.5.1"
this is my tsconfig
{
"ts-node": {
"esm": true,
"experimentalSpecifierResolution": "node",
"transpileOnly": true,
"require": ["tsconfig-paths/register"]
},
"tsc-alias": {
"resolveFullPaths": true
},
"compilerOptions": {
"target": "ES2020",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"module": "ESNext",
"rootDir": "./src",
"moduleResolution": "Node",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"rootDirs": ["src"],
"typeRoots": ["node_modules/@types"],
"types": ["node"],
"outDir": "./dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
},
"include": [ "src/**/*" ],
"exclude": ["node_modules", "dist"]
}
Thx : ) @hakimscode I will solve these and give you an answer as soon as possible.
@hakimscode I tried the same configuration as you, but I did not encounter any issues. I will continue to investigate
The same error for javascript.
I am using like this and getting same error
const { Pulse } = require('@pulsecron/pulse');
const pulse = new Pulse();
@AlexeyMoiseev @virendrak-dev I will check and inform you assuming that an issue occurs in JavaScript.
import { Pulse } from '@pulsecron/pulse';
const pulse = new Pulse();
This works in my case. ESM, nodejs v20.15.1
I'm trying to use Pulse (migrated from Agenda). This is my code
But I got an error that says:
Can someone explain why it happen and how to fix this? thanks