I use a task in no gulp to run my project in developer mode for a long time, however today, when trying to run the project, I got this error:
I use the node with NVM, so I tried to reinstall NVM and the Node version v8.9.3, but that did not solve the problem. I tried reinstalling NPM and it also did not fix the problem.
The error happen when press F5 to run command:
Configuration in VSCode:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Gulp Run Dev",
"program": "$ {workspaceFolder}/node_modules/gulp/bin/gulp.js",
"args": [
"rundev"
]
}
]
}
I noticed that when I run the task manually in Terminal it works:
gulp rundev
I did not perform any updates or changes to the project modules and did not perform any updates to the VSCode.
I noticed that there was an inconsistency in git (I can not say how it happened) but while pointing to the branch 'develop' the code displayed, it was the first commits of the project. Then delete the project folder and re-clone it from the repository. I ran npm install
and after installing the dependencies, I set up the launch.json file again and everything is back to normal.