-
Notifications
You must be signed in to change notification settings - Fork 125
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
Can't run package json script #462
Comments
Hey! This sounds like a really specific use-case. Can you please provide a minimal repository to reproduce your issue? In every case, Clinic.js relies heavily on Node.js core instrumentation. That's why you need to run it with a |
I also have the same issue. My application is running with below command But clinic js enforces to use -- node so I dont think that it supports ts-node.. @alfonsograziano is it true? |
Yes correct. What you can do is to compile your Typescript in a dist folder, and then run |
@tushar32 you can run it by: $ node ./node_modules/.bin/ts-node -r tsconfig-paths/register src/index.ts |
Expected Behavior
I can run package.json script from command line with clinic heapprofiler
clinic heapprofiler -- yarn test
Current Behavior
I can't run(or profile is empty) package.json script from command line with clinic heapprofiler
clinic heapprofiler -- yarn test
I get error - Clinic.js must be called with a
node
command line:clinic heap-profiler -- node script.js
I also tried to do next but profile is empty
clinic heapprofiler -- node /home/mxxnseat/.nvm/versions/node/v18.16.1/bin/yarn test
My package.json test script -
yarn clean && TS_NODE_PROJECT=tsconfig.spec.json nyc -t .nyc_output_integration mocha --config test/integration/.mocharc.yaml
Also I can't use
node /node_modules/[module].js
as I use pnp node_linker in yarn config and I have zipped modulesSteps to Reproduce (for bugs)
Sample upload
Environment
The text was updated successfully, but these errors were encountered: