Problem running in development `sh: concurrently: command not found`
Problem
I tried to follow the instructions at https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/CONTRIBUTING.md#step---4--running-the-extension-in-desktop-vs-code but I was seeing this error:
$ npm run watch:desktop
> gitlab-workflow@4.9.0 watch:desktop
> node scripts/watch_desktop.mjs
> vue-webviews@0.0.0 watch
> rimraf dist/ && concurrently 'npm:issuable-watch'
> vue2-webviews@0.0.0 watch
> rimraf dist/ && concurrently 'npm:chat-watch' 'npm:security-watch'
sh: concurrently: command not found
file:///Users/dylangriffith/workspace/gitlab-org/gitlab-vscode-extension/node_modules/execa/lib/error.js:60
error = new Error(message);
^
As best I could tell the extension was not running properly and the running vscode instance complained about not being able to find the extension with the error:
Activating extension 'GitLab.gitlab-workflow' failed:
...
Cannot find module
Possible fix
I was able to workaround this with the following diff but I'm not sure if I should be adding something to my $PATH instead or if there is some other issues with my npm installation.
diff --git a/webviews/vue2/package.json b/webviews/vue2/package.json
index efdb6aef..945412db 100644
--- a/webviews/vue2/package.json
+++ b/webviews/vue2/package.json
@@ -8,8 +8,8 @@
"chat-watch": "vite --config gitlab_duo_chat/vite.config.js build --watch",
"security": "vite --config security_finding/vite.config.js build",
"security-watch": "vite --config security_finding/vite.config.js build --watch",
- "build": "rimraf dist/ && concurrently 'npm:chat' 'npm:security'",
- "watch": "rimraf dist/ && concurrently 'npm:chat-watch' 'npm:security-watch'",
+ "build": "rimraf dist/ && npm exec concurrently 'npm:chat' 'npm:security'",
+ "watch": "rimraf dist/ && npm exec concurrently 'npm:chat-watch' 'npm:security-watch'",
"test": "jest --config jest.config.js",
"preview": "vite preview --port 4173",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"