Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Astro DB Github action failing #11285

Closed
1 task
thomasledoux1 opened this issue Jun 19, 2024 · 3 comments
Closed
1 task

Astro DB Github action failing #11285

thomasledoux1 opened this issue Jun 19, 2024 · 3 comments
Labels
needs triage Issue needs to be triaged

Comments

@thomasledoux1
Copy link

Astro Info

Astro                    v4.10.3
Node                     v20.13.0
System                   macOS (arm64)
Package Manager          npm
Output                   hybrid
Adapter                  @astrojs/vercel/serverless
Integrations             @astrojs/tailwind
                         @astrojs/react
                         astro-expressive-code
                         @astrojs/mdx
                         astro:db
                         @astrojs/db/file-url
                         @astrojs/sitemap

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Since upgrading my dependencies (and starting to use Astro Actions, not sure if related), I'm getting the following error in the "Run withastro/action-studio@main" part of the Astro DB Github action.

Run withastro/action-studio@main
  with:
    github-token: ***
  env:
    ASTRO_STUDIO_APP_TOKEN: ***
Event: push
Pushing database schema...
/home/runner/work/website-thomas-astro/website-thomas-astro/node_modules/rollup/dist/native.js:59
		throw new Error(
		      ^

Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/48[2](https://github.com/thomasledoux1/website-thomas-astro/actions/runs/9581552366/job/26418608659#step:6:2)8). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at requireWithFriendlyError (/home/runner/work/website-thomas-astro/website-thomas-astro/node_modules/rollup/dist/native.js:59:9)
    at Object.<anonymous> (/home/runner/work/website-thomas-astro/website-thomas-astro/node_modules/rollup/dist/native.js:68:76)
    ... [3](https://github.com/thomasledoux1/website-thomas-astro/actions/runs/9581552366/job/26418608659#step:6:3) lines matching cause stack trace ...
    at Module._load (node:internal/modules/cjs/loader:102[4](https://github.com/thomasledoux1/website-thomas-astro/actions/runs/9581552366/job/26418608659#step:6:4):12)
    at cjsLoader (node:internal/modules/esm/translators:348:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:297:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:222:2[5](https://github.com/thomasledoux1/website-thomas-astro/actions/runs/9581552366/job/26418608659#step:6:5))
    at async ModuleLoader.import (node:internal/modules/esm/loader:31[6](https://github.com/thomasledoux1/website-thomas-astro/actions/runs/9581552366/job/26418608659#step:6:7):24) {
  [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-gnu'
  Require stack:
  - /home/runner/work/website-thomas-astro/website-thomas-astro/node_modules/rollup/dist/native.js
      at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
      at Module._load (node:internal/modules/cjs/loader:986:2[7](https://github.com/thomasledoux1/website-thomas-astro/actions/runs/9581552366/job/26418608659#step:6:8))
      at Module.require (node:internal/modules/cjs/loader:1233:19)
      at require (node:internal/modules/helpers:179:1[8](https://github.com/thomasledoux1/website-thomas-astro/actions/runs/9581552366/job/26418608659#step:6:9))
      at requireWithFriendlyError (/home/runner/work/website-thomas-astro/website-thomas-astro/node_modules/rollup/dist/native.js:41:[10](https://github.com/thomasledoux1/website-thomas-astro/actions/runs/9581552366/job/26418608659#step:6:11))
      at Object.<anonymous> (/home/runner/work/website-thomas-astro/website-thomas-astro/node_modules/rollup/dist/native.js:68:76)
      at Module._compile (node:internal/modules/cjs/loader:1358:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
      at Module.load (node:internal/modules/cjs/loader:[12](https://github.com/thomasledoux1/website-thomas-astro/actions/runs/9581552366/job/26418608659#step:6:13)08:32)
      at Module._load (node:internal/modules/cjs/loader:1024:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
      '/home/runner/work/website-thomas-astro/website-thomas-astro/node_modules/rollup/dist/native.js'
    ]
  }
}

Node.js v20.14.0
Error: Command failed with exit code 1: /home/runner/work/website-thomas-astro/website-thomas-astro/node_modules/astro/astro.js db push

What's the expected result?

For it now to fail, like it was working before upgrading the dependencies to the latest versions.
Runs can be found here:
https://github.com/thomasledoux1/website-thomas-astro/actions
Commit after which it started failing:
thomasledoux1/website-thomas-astro@4402cab

I already tried removing the package-lock.json and recreating it by running 'npm i', that didn't help.

Link to Minimal Reproducible Example

https://github.com/thomasledoux1/website-thomas-astro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jun 19, 2024
@thomasledoux1
Copy link
Author

I get the same error when deploying to Vercel:

Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at requireWithFriendlyError (/vercel/path0/node_modules/rollup/dist/native.js:59:9)
    at Object.<anonymous> (/vercel/path0/node_modules/rollup/dist/native.js:68:76)
    ... 3 lines matching cause stack trace ...
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at cjsLoader (node:internal/modules/esm/translators:366:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:315:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) {
  [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-gnu'
  Require stack:
  - /vercel/path0/node_modules/rollup/dist/native.js
      at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
      at Module._load (node:internal/modules/cjs/loader:984:27)
      at Module.require (node:internal/modules/cjs/loader:1231:19)
      at require (node:internal/modules/helpers:179:18)
      at requireWithFriendlyError (/vercel/path0/node_modules/rollup/dist/native.js:41:10)
      at Object.<anonymous> (/vercel/path0/node_modules/rollup/dist/native.js:68:76)
      at Module._compile (node:internal/modules/cjs/loader:1369:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
      at Module.load (node:internal/modules/cjs/loader:1206:32)
      at Module._load (node:internal/modules/cjs/loader:1022:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/vercel/path0/node_modules/rollup/dist/native.js' ]
  }

@thomasledoux1
Copy link
Author

Caused by package-lock.json not updating correctly, had to remove node_modules & package-lock.json and then re-run npm install

@iozcelik
Copy link
Contributor

iozcelik commented Sep 1, 2024

Caused by package-lock.json not updating correctly, had to remove node_modules & package-lock.json and then re-run npm install

I have same error. I do that however nothing fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants