Skip to content

[BUG] npm package was not found (sql-formatter) #412

@doum1004

Description

@doum1004

Action config

      - uses: FirebaseExtended/action-hosting-deploy@v0
        with:
          repoToken: ${{ secrets.GITHUB_TOKEN }}
          firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
          channelId: live
          projectId: ....

Error message

Run FirebaseExtended/action-hosting-deploy@v0
Verifying firebase.json exists
Setting up CLI credentials
Deploying to production site
  /usr/local/bin/npx firebase-tools@latest deploy --only hosting --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:1[24](https://github.com/..../actions/runs/13964637473/job/39092198105#step:12:27)9: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.<anonymous> (/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/firebase-tools/lib/dataconnect/schemaMigration.js:5:[25](https://github.com/.../actions/runs/13964637473/job/39092198105#step:12:28))
      at Module._compile (node:internal/modules/cjs/loader:1529:14) ***
    code: 'MODULE_NOT_FOUND',
    path: '/home/runner/.npm/_npx/ba4f1959e38407b5/node_modules/sql-formatter/package.json'
  ***

Expected behavior

Actual behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions