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

npm run build faild in docker container with node 20.17 npm 10.8.2 without proxy or internet #978

Open
remcocats opened this issue Dec 2, 2024 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@remcocats
Copy link

I tried this:

when I run the npm build after een npm ci I get this error:

This happened:

15:42:49 [ERROR] [vite] x Build failed in 3.02s
transforming (427) [../node_modules/@heroicons/react/20/solid/esm/UserGroupIcon.jsvite]: Rollup failed to resolve import "@stoplight/markdown-viewer" from /pub/node_modules/@stoplight/json-schema-viewer/index.mjs.
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
Stack trace:
at viteWarn (file:///pub/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:65589:17)
at onRollupWarning (file:///pub/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:65619:5)
at file:///pub/node_modules/rollup/dist/es/shared/node-entry.js:19475:13
at ModuleLoader.handleInvalidResolvedId (file:///pub/node_modules/rollup/dist/es/shared/node-entry.js:20090:26)
npm verbose cwd /pub/.eventcatalog-core
npm verbose os Linux 4.18.0-553.22.1.el8_10.x86_64
npm verbose node v20.17.0
npm verbose npm v10.8.2
npm verbose exit 1
npm verbose code 1
node:internal/errors:984
const err = new Error(message);
^

Error: Command failed: cross-env PROJECT_DIR='/pub' CATALOG_DIR='/pub/.eventcatalog-core' npm run build
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:891:11)
at execSync (node:child_process:963:15)
at Command. (/pub/node_modules/@eventcatalog/core/bin/dist/eventcatalog.cjs:535:42)
at async Command.parseAsync (/pub/node_modules/commander/lib/command.js:1092:5) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 435,
stdout: null,
stderr: null
}

I expected this:

that the build succeded

Is there a workaround?

I'm still searching for a workaround

Anything else?

No response

EventCatalog Version

No response

Node.js Version

No response

Platform(s)

Linux

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@remcocats remcocats added the bug Something isn't working label Dec 2, 2024
@boyney123 boyney123 added help wanted Extra attention is needed good first issue Good for newcomers labels Dec 2, 2024
@hartmanjan1970
Copy link

hartmanjan1970 commented Dec 3, 2024

the bug seems to be fixed with the following addition of the stoplight dependencies in our package.json:

  "dependencies": {
    "@eventcatalog/core": "2.14.2",
    "@eventcatalog/generator-asyncapi": "^2.7.1",
    "@stoplight/markdown-viewer": "^5.7.1",
    "@stoplight/mosaic-code-viewer": "^1.53.4",
    "deasync": "^0.1.30"
  }

@glc-omid
Copy link
Contributor

glc-omid commented Dec 3, 2024

The actual used stoplight version has the >=20.10 node constraint
i think this must be upgraded in EC

need to have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants