You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not entirely sure if it is related to the VSC extension, but it's working outside the extension, so i'll create an issue, maybe somebody knows something. The issue started appearing after firebase-tools 12.2.1. It is working in that version and the versions below it.
Removign the predeploy scripts removes the error, but this is not preferable. Changing the RESOURCE_DIR paths or hard-coding, also doesn't resolve the error. at the moment I'm just running the commands manually.
I'm guessing it could be related to an environment variable that is not available when the VSC extension runs the scripts in package.json, but this is a guess. I'm not entirely sure.
The text was updated successfully, but these errors were encountered:
It sounds like you would have installed firebase-tools globally using npm install -g firebase-tools however based on the error it cannot find the path or doesnt have access to it. On Windows you would have had to run the command as an admin, so it's possible you would need to run VS Code as admin to have it run firebase tools successfully. Another alternative is to install firebase-tools locally and put npx in front of your commands to run firebase.
Thank you for your reply. No luck so far, I tried starting VSC as administrator by default, but the issue still remains. It's also weird it only shows up in version 12.2.1+, in version 12.2.1 or lower it is working fine, also when VSC is not run as administrator.
Placing npx in front of the command also didn't have the desired effect.
The work-around for me now is to run the command manually, and that's working fine. When I find a solution I will update this comment. Thank you for your suggestions.
Not entirely sure if it is related to the VSC extension, but it's working outside the extension, so i'll create an issue, maybe somebody knows something. The issue started appearing after firebase-tools 12.2.1. It is working in that version and the versions below it.
In my package.json file, i have:
"functions-deploy": "firebase deploy --only functions",
Which works if i run it manually or when i run it as NPM run. Both of the following work:
If i click on the script in the VSC plugin, i get the following error:
Error: Cannot find module 'C:\Users\...\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\cross-env\dist\bin\cross-env-shell.js'
This error does not appear if i manually run it in a shell. Its triggered by predeploy scripts in firebase.json
Removign the predeploy scripts removes the error, but this is not preferable. Changing the RESOURCE_DIR paths or hard-coding, also doesn't resolve the error. at the moment I'm just running the commands manually.
I'm guessing it could be related to an environment variable that is not available when the VSC extension runs the scripts in package.json, but this is a guess. I'm not entirely sure.
The text was updated successfully, but these errors were encountered: