dineug / erd-editor

Entity-Relationship Diagram Editor
https://erd-editor.io
MIT License
956 stars 99 forks source link

Guides on how to contribute to the project #373

Open heitorgiacomini opened 5 months ago

heitorgiacomini commented 5 months ago

My knowledge is in angular spa. And i`m look for guides in order to contribute with this project.

heitorgiacomini commented 5 months ago

Got some error trying to run vite

npx vite serve --mode lib
X [ERROR] Failed to resolve entry for package "@dineug/vite-plugin-r-html". The package may have incorrect main/module/exports specified in its package.json. [plugin externalize-deps]

    ../../../../../../Users/a/AppData/Local/npm-cache/_npx/9ed06546b0653f96/node_modules/esbuild/lib/main.js:1225:27:    
      1225 │         let result = await callback({
           ╵                            ^

    at packageEntryFailure (file:///C:/Users/a/AppData/Local/npm-cache/_npx/9ed06546b0653f96/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:47164:15)
    at resolvePackageEntry (file:///C:/Users/a/AppData/Local/npm-cache/_npx/9ed06546b0653f96/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:47161:3)
    at tryNodeResolve (file:///C:/Users/a/AppData/Local/npm-cache/_npx/9ed06546b0653f96/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:46977:16)
    at resolveByViteResolver (file:///C:/Users/a/AppData/Local/npm-cache/_npx/9ed06546b0653f96/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66873:20)
    at file:///C:/Users/a/AppData/Local/npm-cache/_npx/9ed06546b0653f96/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66906:28
    at requestCallbacks.on-resolve (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:1225:28)
    at handleRequest (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:647:17)  
    at handleIncomingPacket (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:672:7)
    at Socket.readFromStdout (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:600:7)
    at Socket.emit (node:events:518:28)

  This error came from the "onResolve" callback registered here:

    ../../../../../../Users/a/AppData/Local/npm-cache/_npx/9ed06546b0653f96/node_modules/esbuild/lib/main.js:1150:20:    
      1150 │       let promise = setup({
           ╵                     ^

    at setup (file:///C:/Users/a/AppData/Local/npm-cache/_npx/9ed06546b0653f96/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66894:18)
    at handlePlugins (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:1150:21) 
    at buildOrContextImpl (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:873:5)
    at Object.buildOrContext (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:699:5)
    at C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:2023:15
    at new Promise (<anonymous>)
    at Object.build (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:2022:25)  
    at build (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:1873:51)
    at bundleConfigFile (file:///C:/Users/a/AppData/Local/npm-cache/_npx/9ed06546b0653f96/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66849:24)

  The plugin "externalize-deps" was triggered by this import

    vite.config.ts:4:18:
      4 │ import rHtml from '@dineug/vite-plugin-r-html';
        ╵                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

failed to load config from C:\_0PROJETOS\Angular\er-diagram\erd-editor\packages\erd-editor\vite.config.ts
error when starting dev server:
Error: Build failed with 1 error:
../../../../../../Users/a/AppData/Local/npm-cache/_npx/9ed06546b0653f96/node_modules/esbuild/lib/main.js:1225:27: ERROR: [plugin: externalize-deps] Failed to resolve entry for package "@dineug/vite-plugin-r-html". The package may have incorrect main/module/exports specified in its package.json.
    at failureErrorWithLog (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:1472:15)
    at C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:945:25
    at runOnEndCallbacks (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:1315:45)
    at buildResponseToResult (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:943:7)
    at C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:970:16
    at responseCallbacks.<computed> (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:622:9)
    at handleIncomingPacket (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:677:12)
    at Socket.readFromStdout (C:\Users\a\AppData\Local\npm-cache\_npx\9ed06546b0653f96\node_modules\esbuild\lib\main.js:600:7)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:559:12)
heitorgiacomini commented 5 months ago
erd-editor\packages\erd-editor> pnpm dev

> @dineug/erd-editor@3.2.3 dev C:\_0PROJETOS\Angular\er-diagram\erd-editor\packages\erd-editor
> vite serve --mode lib

X [ERROR] Failed to resolve entry for package "@dineug/vite-plugin-r-html". The package may have incorrect main/module/exports specified in its package.json. [plugin externalize-deps]

    ../../node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:1225:27:
      1225 │         let result = await callback({
           ╵                            ^

    at packageEntryFailure (file:///C:/_0PROJETOS/Angular/er-diagram/erd-editor/node_modules/.pnpm/vite@5.3.2_@types+node@18.19.39_terser@5.31.1/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:47164:15)
    at resolvePackageEntry (file:///C:/_0PROJETOS/Angular/er-diagram/erd-editor/node_modules/.pnpm/vite@5.3.2_@types+node@18.19.39_terser@5.31.1/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:47161:3)
    at tryNodeResolve (file:///C:/_0PROJETOS/Angular/er-diagram/erd-editor/node_modules/.pnpm/vite@5.3.2_@types+node@18.19.39_terser@5.31.1/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:46977:16)
    at resolveByViteResolver (file:///C:/_0PROJETOS/Angular/er-diagram/erd-editor/node_modules/.pnpm/vite@5.3.2_@types+node@18.19.39_terser@5.31.1/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66873:20)
    at file:///C:/_0PROJETOS/Angular/er-diagram/erd-editor/node_modules/.pnpm/vite@5.3.2_@types+node@18.19.39_terser@5.31.1/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66906:28
    at requestCallbacks.on-resolve (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:1225:28)
    at handleRequest (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:647:17)
    at handleIncomingPacket (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:672:7)
    at Socket.readFromStdout (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:600:7)
    at Socket.emit (node:events:518:28)

  This error came from the "onResolve" callback registered here:

    ../../node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:1150:20:
      1150 │       let promise = setup({
           ╵                     ^

    at setup (file:///C:/_0PROJETOS/Angular/er-diagram/erd-editor/node_modules/.pnpm/vite@5.3.2_@types+node@18.19.39_terser@5.31.1/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66894:18)
    at handlePlugins (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:1150:21)
    at buildOrContextImpl (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:873:5)
    at Object.buildOrContext (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:699:5)
    at C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:2023:15
    at new Promise (<anonymous>)
    at Object.build (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:2022:25)
    at build (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:1873:51)
    at bundleConfigFile (file:///C:/_0PROJETOS/Angular/er-diagram/erd-editor/node_modules/.pnpm/vite@5.3.2_@types+node@18.19.39_terser@5.31.1/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66849:24)

  The plugin "externalize-deps" was triggered by this import

    vite.config.ts:4:18:
      4 │ import rHtml from '@dineug/vite-plugin-r-html';
        ╵                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

failed to load config from C:\_0PROJETOS\Angular\er-diagram\erd-editor\packages\erd-editor\vite.config.ts
error when starting dev server:
Error: Build failed with 1 error:
../../node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:1225:27: ERROR: [plugin: externalize-deps] Failed to resolve entry for package "@dineug/vite-plugin-r-html". The package may have incorrect main/module/exports specified in its package.json.
    at failureErrorWithLog (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:1472:15)
    at C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:945:25
    at runOnEndCallbacks (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:1315:45)
    at buildResponseToResult (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:943:7)
    at C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:970:16
    at responseCallbacks.<computed> (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:622:9)
    at handleIncomingPacket (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:677:12)
    at Socket.readFromStdout (C:\_0PROJETOS\Angular\er-diagram\erd-editor\node_modules\.pnpm\esbuild@0.21.5\node_modules\esbuild\lib\main.js:600:7)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:559:12)
 ELIFECYCLE  Command failed with exit code 1.
dineug commented 5 months ago

Because it is a monorepo, building internal dependencies is necessary. Please run pnpm nx:dev @heitorgiacomini