ErickWendel/nodejs-with-mongodb-api-example

npm run build error

Opened this issue · 2 comments

Hi,

I ran across this project while learning docker. I am using node14 and npm run build throws error:

npm ERR! errno 1
npm ERR! nodejs-with-mongodb-api-example@1.0.0 build: `npx typescript`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodejs-with-mongodb-api-example@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I think package.json needs to be changed. build script needs to be:

npx tsc

Please reply if you find this relevant.
Thanks

Replying to say this fixed an issue I was having:

$ npm run build

> nodejs-with-mongodb-api-example@1.0.0 build
> npx typescript

npm ERR! could not determine executable to run

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gabe/.npm/_logs/2021-12-18T13_57_56_634Z-debug.log

# Build run after changing to npx tsc in package.json
$ npm run build

> nodejs-with-mongodb-api-example@1.0.0 build
> npx tsc

Same, npx tsc was correct for me as well, not "npx typescript" as the project states.