npm-run

Node and NPM Running script and Ctrl-C triggers SIGINT twice

与世无争的帅哥 提交于 2021-02-19 01:45:30
问题 I've come across a problem on one of my Nodejs apps running with npm start (which just does node app.js ). My app contains a sigint handler as follows: process.on('SIGINT', () => { db.disconnect().then({ process.exit(0); }).catch(e => process.exit(1)); }); With corresponding logs. After some testing on other files, I've noticed that Ctrl-C when on an npm process triggers SIGINT twice if the first one takes too long to exit. (try adding a timeout on a sample app). For now I've added a counter

Nest js: npm run start fails

夙愿已清 提交于 2021-01-29 10:46:49
问题 I'm trying to create a Nest js application, but when I follow the steps on their website, the first error I get is 'cannot find ts-node'. So, I installed that. There were a couple more typscript modules I needed to install (typscript and tsconfig-paths I believe) and when I cleared those errors up and run npm run start I got a 'Cannot find node module @nestjs/core'. 回答1: As soon as you are working with typescript you have to install it in order to be able to use the tsc command which will

VSCode terminal process command failed to launch

时光怂恿深爱的人放手 提交于 2021-01-27 05:36:30
问题 I am trying out the Hello World sample extension. But when I run the extension from the 'Run Extension' task. It gives the following error: The terminal process command '/bin/zsh -c 'npm run watch'' failed to launch (exit code: 127) But I am able to run the above command from terminal without any errors. 回答1: Just found this https://github.com/microsoft/vscode/issues/76542 For me in OSX apparently is an issue when opening code from the terminal with code . and can be fixed by checking in