Deploy Error
[REQUIRED] Environment info
firebase-tools: 13.34.0
Platform: Ubuntu
[REQUIRED] Test case
No
[REQUIRED] Steps to reproduce
Run FirebaseExtended/action-hosting-deploy@v0
[REQUIRED] Expected behavior
Deploy Success
[REQUIRED] Actual behavior
Deploy Error,
Output:
/usr/local/bin/npx firebase-tools@latest hosting:channel:deploy pr1380-haoqianli_aa-price-e --only dev --expires 20d --project *** --json npm warn exec The following package was not found and will be installed: [email protected] node:internal/modules/cjs/loader:643 throw e; ^
Error: Cannot find module '/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/sql-formatter/dist/cjs/index.cjs'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:1249:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:1237:15)
at resolveExports (node:internal/modules/cjs/loader:636:14)
at Module._findPath (node:internal/modules/cjs/loader:716:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1198:27)
at Module._load (node:internal/modules/cjs/loader:1043:27)
at Module.require (node:internal/modules/cjs/loader:1298:19)
at require (node:internal/modules/helpers:182:18)
at Object.
Node.js v20.19.0
The process '/usr/local/bin/npx' failed with exit code 1 Retrying deploy with the --debug flag for better error output /usr/local/bin/npx firebase-tools@latest hosting:channel:deploy pr1380-haoqianli_aa-price-e --only dev --expires 20d --project *** --debug node:internal/modules/cjs/loader:643 throw e; ^
Error: Cannot find module '/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/sql-formatter/dist/cjs/index.cjs'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:1249:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:1237:15)
at resolveExports (node:internal/modules/cjs/loader:636:14)
at Module._findPath (node:internal/modules/cjs/loader:716:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1198:27)
at Module._load (node:internal/modules/cjs/loader:1043:27)
at Module.require (node:internal/modules/cjs/loader:1298:19)
at require (node:internal/modules/helpers:182:18)
at Object.
Node.js v20.19.0
The process '/usr/local/bin/npx' failed with exit code 1 Error: The process '/usr/local/bin/npx' failed with exit code 1
https://github.com/sql-formatter-org/sql-formatter/issues/845
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.
Most likely related to this change in SQL-formatter, https://github.com/sql-formatter-org/sql-formatter/releases/tag/v15.5.0
The dependency in firebase-tools' package.json is "sql-formatter": "^15.3.0", so this might be happening on every fresh install of firebase-tools, including most CI pipeline runs too.
We have the same issue
Most likely related to this change in SQL-formatter, https://github.com/sql-formatter-org/sql-formatter/releases/tag/v15.5.0
The dependency in firebase-tools' package.json is "sql-formatter": "^15.3.0", so this might be happening on every fresh install of firebase-tools, including most CI pipeline runs too.
Yes, Saw it, SQL-formatter was updated 2 hours ago. so bad !
So do we just wait for sql-formatter to fix it? is there anything else we can do?
so we need sql-formatter fix it ? i saw an update 2h ago
Getting this same issue
Same issue here
So do we just wait for sql-formatter to fix it? is there anything else we can do?
I think this is an online service and we can't solve it for now.
Related questions: https://github.com/sql-formatter-org/sql-formatter/issues/845
i am acing same issue today
Same issue,
first happened in github action.
Then i did a fresh of firebase-tools locally, same issue on my local now.
We fixed this by switching to installing the firebase-tools cli not from NPM but using the standalone binary:
curl -sL firebase.tools | bash
Downgrading to version 13.0.2 fixes as well
You can temporarily work around this by using a version such as v13.6.0, which was released before sql-formatter was introduced. Naturally, this is not a recommended solution. It may cause other problems.
It's best to wait for the firebase-tools to be fixed.
We got our Github Actions working with this type of hack which creates a version where sql-formatter is downgraded back to latest working version, then installs that globally for the action runner, and gets subsequent firebase-tool calls to work again.
So from
run: npm install -g firebase-tools
to
run: |
mkdir -p /tmp/firebase-install
cd /tmp/firebase-install
echo '{"dependencies":{"firebase-tools":"latest"},"overrides":{"sql-formatter":"15.3.0"}}' > package.json
npm install
npm install -g $(pwd)/node_modules/firebase-tools
Fixing: https://github.com/sql-formatter-org/sql-formatter/pull/846
fixed!
released! https://github.com/sql-formatter-org/sql-formatter/releases/tag/v15.5.1
Thanks! Fix works!