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

Dockerized Build fails (17.0.5) #50409

Open
gabrielcossette opened this issue Dec 18, 2024 · 1 comment
Open

Dockerized Build fails (17.0.5) #50409

gabrielcossette opened this issue Dec 18, 2024 · 1 comment
Labels

Comments

@gabrielcossette
Copy link

Expected behavior:

Dockerized Build should be successful.

Current behavior:

When trying to do a Dockerized Build under version 17.0.5:

make -C build.assets build-binaries

I get this error at some point:

x Build failed in 989ms
error during build:
[vite]: Rollup failed to resolve import "@emotion/is-prop-valid" from "/go/src/github.com/gravitational/teleport/web/packages/design/src/ThemeProvider/index.tsx".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at viteWarn (file:///go/src/github.com/gravitational/teleport/node_modules/.pnpm/vite@5.3.2_@types+node@20.14.9_terser@5.31.1/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:65876:17)
    at onwarn (file:///go/src/github.com/gravitational/teleport/node_modules/.pnpm/@vitejs+plugin-react-swc@3.7.0_vite@5.3.2_@types+node@20.14.9_terser@5.31.1_/node_modules/@vitejs/plugin-react-swc/index.mjs:203:9)
    at onRollupWarning (file:///go/src/github.com/gravitational/teleport/node_modules/.pnpm/vite@5.3.2_@types+node@20.14.9_terser@5.31.1/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:65909:5)
    at onwarn (file:///go/src/github.com/gravitational/teleport/node_modules/.pnpm/vite@5.3.2_@types+node@20.14.9_terser@5.31.1/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:65571:7)
    at file:///go/src/github.com/gravitational/teleport/node_modules/.pnpm/rollup@4.16.1/node_modules/rollup/dist/es/shared/node-entry.js:18570:13
    at Object.logger [as onLog] (file:///go/src/github.com/gravitational/teleport/node_modules/.pnpm/rollup@4.16.1/node_modules/rollup/dist/es/shared/node-entry.js:20218:9)
    at ModuleLoader.handleInvalidResolvedId (file:///go/src/github.com/gravitational/teleport/node_modules/.pnpm/rollup@4.16.1/node_modules/rollup/dist/es/shared/node-entry.js:19160:26)
    at file:///go/src/github.com/gravitational/teleport/node_modules/.pnpm/rollup@4.16.1/node_modules/rollup/dist/es/shared/node-entry.js:19118:26
/go/src/github.com/gravitational/teleport/web/packages/teleport:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @gravitational/teleport@1.0.0 build: `pnpm build-wasm && vite build`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

Thanks!

@zmb3 zmb3 closed this as completed Dec 20, 2024
@zmb3 zmb3 reopened this Dec 20, 2024
@zmb3
Copy link
Collaborator

zmb3 commented Dec 23, 2024

I get a different error:

/go/src/github.com/gravitational/teleport/node_modules/.pnpm/rollup@4.23.0/node_modules/rollup/dist/native.js:59
                throw new Error(
                      ^

Error: Cannot find module @rollup/rollup-linux-arm64-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 (/go/src/github.com/gravitational/teleport/node_modules/.pnpm/rollup@4.23.0/node_modules/rollup/dist/native.js:59:9)
    at Object.<anonymous> (/go/src/github.com/gravitational/teleport/node_modules/.pnpm/rollup@4.23.0/node_modules/rollup/dist/native.js:68:76)
    ... 3 lines matching cause stack trace ...
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at cjsLoader (node:internal/modules/esm/translators:346:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:286:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24) {
  [cause]: Error: Cannot find module '@rollup/rollup-linux-arm64-gnu'
  Require stack:
  - /go/src/github.com/gravitational/teleport/node_modules/.pnpm/rollup@4.23.0/node_modules/rollup/dist/native.js
      at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
      at Module._load (node:internal/modules/cjs/loader:1051:27)
      at Module.require (node:internal/modules/cjs/loader:1311:19)
      at require (node:internal/modules/helpers:179:18)
      at requireWithFriendlyError (/go/src/github.com/gravitational/teleport/node_modules/.pnpm/rollup@4.23.0/node_modules/rollup/dist/native.js:41:10)
      at Object.<anonymous> (/go/src/github.com/gravitational/teleport/node_modules/.pnpm/rollup@4.23.0/node_modules/rollup/dist/native.js:68:76)
      at Module._compile (node:internal/modules/cjs/loader:1469:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
      at Module.load (node:internal/modules/cjs/loader:1288:32)
      at Module._load (node:internal/modules/cjs/loader:1104:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
      '/go/src/github.com/gravitational/teleport/node_modules/.pnpm/rollup@4.23.0/node_modules/rollup/dist/native.js'
    ]
  }
}

Node.js v20.18.0
/go/src/github.com/gravitational/teleport/web/packages/teleport:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @gravitational/teleport@1.0.0 build: `pnpm build-wasm && vite build`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

This seems to be because rollup (a depdendency of Vite) now includes native code that is automatically installed as an optional npm dependency on supported platforms, and something about this optional dependency install on arm64-gnu fails.

I tried adding a pnpm override for @rollup/wasm-node - no such luck.

Our lockfile only has an entry for @rollup/rollup-linux-arm-gnueabihf@4.23.0, may be related.

cc @ryanclark - any ideas?

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

No branches or pull requests

2 participants