Closed marcosh closed 6 months ago
I think this is not the issue of this plugin. I did some search, and this is the closest answer I found - https://stackoverflow.com/questions/31472755/sudo-npm-command-not-found.
Thanks for the hint. I solved it modifying my configuration to
{
"runOnSave.statusMessageTimeout": 3000,
"runOnSave.commands": [
{
"match": ".*\\.purs$",
"command": "export PATH=/home/marcosh/.nvm/versions/node/v16.20.0/bin:$PATH && echo $PATH && npm run format-single -- ${fileRelative}",
"runIn": "backend",
"runningStatusMessage": "Formatting ${fileBasename}",
"finishStatusMessage": "${fileBasename} formatted"
}
]
}
I'm trying to set up
Run on save
on one vscode project.I'd like it to run a
npm
script, so I configured it likeWhen I save a
.purs
file, the command is correctly triggered, but it produces aerror message.
npm
is correctly installed on my system, and, in fact, if I run the same trigger usingrunIn: "terminal"
, it works correctly.What should I do to make
npm
visible torun-on-save
?