event-catalog / eventcatalog

An open source documentation tool to bring discoverability to your event-driven architectures
https://eventcatalog.dev
MIT License
1.7k stars 145 forks source link

Unable to update to 2.17.13 #804

Closed nenne70 closed 1 week ago

nenne70 commented 2 weeks ago

I tried this:

I tried to update to 2.7.13, I removed .eventcatalog-core node_modules package-lock.json

once deleted I did

npm install

This happened:

nenne@MacBook-Pro eventcatalogv2 % npm run build

eventcatalogv2@0.1.0 build eventcatalog build

Building EventCatalog...

@eventcatalog/core@2.7.13 build npm run scripts:hydrate-content && node scripts/analytics/log-build.js && astro check --minimumSeverity error && astro build

@eventcatalog/core@2.7.13 scripts:hydrate-content node scripts/catalog-to-astro-content-directory.js

14:40:18 [types] Generated 156ms 14:40:18 [check] Getting diagnostics for Astro files in /Users/nenne/repos/piece42/terraform-project-p42-eventcatalog/eventcatalogv2/.eventcatalog-core... src/utils/collections/file-diffs.ts:22:33 - error ts(7006): Parameter 'part' implicitly has an 'any' type.

22 const hasChanges = diff.some((part) => part.added || part.removed);

src/utils/collections/file-diffs.ts:3:40 - error ts(7016): Could not find a declaration file for module 'diff'. '/Users/nenne/repos/piece42/terraform-project-p42-eventcatalog/eventcatalogv2/node_modules/diff/lib/index.mjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/diff` if it exists or add a new declaration (.d.ts) file containing `declare module 'diff';`

3 import { diffLines, type Change } from 'diff';

Result (116 files):

Error: Command failed: cross-env PROJECT_DIR='/Users/nenne/repos/piece42/terraform-project-p42-eventcatalog/eventcatalogv2' CATALOG_DIR='/Users/nenne/repos/piece42/terraform-project-p42-eventcatalog/eventcatalogv2/.eventcatalog-core' npm run build at genericNodeError (node:internal/errors:984:15) at wrappedFn (node:internal/errors:538:14) at checkExecSyncError (node:child_process:890:11) at execSync (node:child_process:962:15) at _Command. (/Users/nenne/repos/piece42/terraform-project-p42-eventcatalog/eventcatalogv2/node_modules/@eventcatalog/core/bin/dist/eventcatalog.cjs:3134:42) at _Command.listener [as _actionHandler] (/Users/nenne/repos/piece42/terraform-project-p42-eventcatalog/eventcatalogv2/node_modules/@eventcatalog/core/bin/dist/eventcatalog.cjs:1443:21) at /Users/nenne/repos/piece42/terraform-project-p42-eventcatalog/eventcatalogv2/node_modules/@eventcatalog/core/bin/dist/eventcatalog.cjs:2233:24 at _Command._chainOrCall (/Users/nenne/repos/piece42/terraform-project-p42-eventcatalog/eventcatalogv2/node_modules/@eventcatalog/core/bin/dist/eventcatalog.cjs:2141:16) at _Command._parseCommand (/Users/nenne/repos/piece42/terraform-project-p42-eventcatalog/eventcatalogv2/node_modules/@eventcatalog/core/bin/dist/eventcatalog.cjs:2231:31) at /Users/nenne/repos/piece42/terraform-project-p42-eventcatalog/eventcatalogv2/node_modules/@eventcatalog/core/bin/dist/eventcatalog.cjs:2042:31 { status: 1, signal: null, output: [ null, null, null ], pid: 65033, stdout: null, stderr: null }

I expected this:

Expected to be able to build

Is there a workaround?

No response

Anything else?

No response

EventCatalog Version

2.7.13

Node.js Version

v21.7.2

Platform(s)

MacOS

Community Notes

carlosallexandre commented 2 weeks ago

Install @types/diff and @types/lodash.merge as devDependecies. For more details, check this issue and this discussion.

A solution is being discussed for this here

boyney123 commented 1 week ago

New GitHub action has been added thanks to @carlosallexandre , hopefully catches this in the future.

Thanks for raising @nenne70 , thanks for supporting @carlosallexandre