clinicjs / node-clinic

Clinic.js diagnoses your Node.js performance issues
https://clinicjs.org
MIT License
5.69k stars 125 forks source link

feature: support fastify-cli or npm script #352

Closed Eomm closed 2 years ago

Eomm commented 2 years ago

Expected Behavior

I have a fastify-cli application that starts with this setup:

npm start

// where package.json start looks like:
// "start": "fastify start --require './configs/tracing.js' -l info --options app.js",

Current Behavior

Error:

Clinic.js must be called with a `node` command line: `clinic doctor -- node script.js`

Environment

clinic "-v" v11.1.0

clinic "docktor" "-v" v9.2.1

RafaelGSS commented 2 years ago

try to change your startto:

clinic doctor -- node ./node_modules/.bin/fastify start --require './configs/tracing.js' -l info --options app.js

Eomm commented 2 years ago

Good suggestion! It works