silverbulletmd / silverbullet

The knowledge tinkerer's notebook
https://silverbullet.md
MIT License
2.61k stars 189 forks source link

Building locally fails on 'main' - Step: deno bundle #392

Closed sweisgerber closed 1 year ago

sweisgerber commented 1 year ago

Hello,

bundling the current main->HEAD fails locally, as well as when executing it on the github actions workflow. Am I doing sth. wrong, as the logs indicate missing dependencies?

commit acfea3289d0293b12ed7128a8f92f016166b3b5e (HEAD -> main, origin/main, origin/HEAD)
Author: Zef Hemel <zef@zef.me>
Date:   Wed Apr 19 11:06:21 2023 +0200

steps to reproduce

deno task build && deno task bundle

build output:

deno run -A --unstable build_plugs.ts && deno run -A --unstable build_web.ts
Building [
  "/home/sweisgerber/workspace/silverbullet/plugs/collab/collab.plug.yaml",
  "/home/sweisgerber/workspace/silverbullet/plugs/core/core.plug.yaml",
  "/home/sweisgerber/workspace/silverbullet/plugs/directive/directive.plug.yaml",
  "/home/sweisgerber/workspace/silverbullet/plugs/emoji/emoji.plug.yaml",
  "/home/sweisgerber/workspace/silverbullet/plugs/markdown/markdown.plug.yaml",
  "/home/sweisgerber/workspace/silverbullet/plugs/plugmd/plugmd.plug.yaml",
  "/home/sweisgerber/workspace/silverbullet/plugs/share/share.plug.yaml",
  "/home/sweisgerber/workspace/silverbullet/plugs/sync/sync.plug.yaml",
  "/home/sweisgerber/workspace/silverbullet/plugs/tasks/tasks.plug.yaml"
]
Emitting bundle to /home/sweisgerber/workspace/silverbullet/dist_bundle/_plug/emoji.plug.jsonFnZQ/dist/index.d.ts
Emitting bundle to /home/sweisgerber/workspace/silverbullet/dist_bundle/_plug/share.plug.jsonFnZQ/dist/index.d.ts
Emitting bundle to /home/sweisgerber/workspace/silverbullet/dist_bundle/_plug/markdown.plug.json
Emitting bundle to /home/sweisgerber/workspace/silverbullet/dist_bundle/_plug/directive.plug.json
Emitting bundle to /home/sweisgerber/workspace/silverbullet/dist_bundle/_plug/plugmd.plug.json
Emitting bundle to /home/sweisgerber/workspace/silverbullet/dist_bundle/_plug/tasks.plug.jsonFnZQ/dist/index.d.ts
Emitting bundle to /home/sweisgerber/workspace/silverbullet/dist_bundle/_plug/collab.plug.json
Emitting bundle to /home/sweisgerber/workspace/silverbullet/dist_bundle/_plug/sync.plug.json
Emitting bundle to /home/sweisgerber/workspace/silverbullet/dist_bundle/_plug/core.plug.json
Done building plugs in 21027ms
Bundling dist_bundle/web/global.plug.json
Bundling dist_bundle/web/iAWriterMonoS-Regular.woff2
Bundling dist_bundle/web/favicon.png
Bundling dist_bundle/web/client.js
Bundling dist_bundle/web/index.html
Bundling dist_bundle/web/client.js.map
Bundling dist_bundle/web/logo.png
Bundling dist_bundle/web/auth.html
Bundling dist_bundle/web/iAWriterMonoS-BoldItalic.woff2
Bundling dist_bundle/web/LICENSE.md
Bundling dist_bundle/web/iAWriterMonoS-Bold.woff2
Bundling dist_bundle/web/service_worker.js
Bundling dist_bundle/web/worker.js
Bundling dist_bundle/web/main.css
Bundling dist_bundle/web/iAWriterMonoS-Italic.woff2
Bundling dist_bundle/web/worker.js.map
Bundling dist_bundle/web/manifest.json
Bundling dist_bundle/web/service_worker.js.map
Bundling dist_bundle/_plug/sync.plug.json
Bundling dist_bundle/_plug/share.plug.json
Bundling dist_bundle/_plug/markdown.plug.json
Bundling dist_bundle/_plug/tasks.plug.json
Bundling dist_bundle/_plug/collab.plug.json
Bundling dist_bundle/_plug/core.plug.json
Bundling dist_bundle/_plug/plugmd.plug.json
Bundling dist_bundle/_plug/directive.plug.json
Bundling dist_bundle/_plug/emoji.plug.json
Built!
Task bundle deno bundle silverbullet.ts dist/silverbullet.js
Warning "deno bundle" is deprecated and will be removed in the future.
Use alternative bundlers like "deno_emit", "esbuild" or "rollup" instead.
Check file:///home/sweisgerber/workspace/silverbullet/silverbullet.ts
error: TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'yaml'.
export { yaml as yamlLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.1/mode/yaml?external=@codemirror/language";
         ~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:95:10

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'pgSQL'.
  pgSQL as postgresqlLanguage,
  ~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:97:3

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'standardSQL'.
  standardSQL as sqlLanguage,
  ~~~~~~~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:98:3

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'rust'.
export { rust as rustLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.1/mode/rust?external=@codemirror/language";
         ~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:100:10

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'css'.
export { css as cssLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.1/mode/css?external=@codemirror/language";
         ~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:101:10

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'python'.
export { python as pythonLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.1/mode/python?external=@codemirror/language";
         ~~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:102:10

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'protobuf'.
export { protobuf as protobufLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.1/mode/protobuf?external=@codemirror/language";
         ~~~~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:103:10

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'shell'.
export { shell as shellLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.1/mode/shell?external=@codemirror/language";
         ~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:104:10

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'swift'.
export { swift as swiftLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.1/mode/swift?external=@codemirror/language";
         ~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:105:10

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'toml'.
export { toml as tomlLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.1/mode/toml?external=@codemirror/language";
         ~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:106:10

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'xml'.
export { xml as xmlLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.1/mode/xml?external=@codemirror/language";
         ~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:107:10

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'json'.
export { json as jsonLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.1/mode/javascript?external=@codemirror/language";
         ~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:108:10

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'c'.
  c as cLanguage,
  ^
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:110:3

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'cpp'.
  cpp as cppLanguage,
  ~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:111:3

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'csharp'.
  csharp as csharpLanguage,
  ~~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:112:3

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'dart'.
  dart as dartLanguage,
  ~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:113:3

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'java'.
  java as javaLanguage,
  ~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:114:3

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'kotlin'.
  kotlin as kotlinLanguage,
  ~~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:115:3

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'objectiveC'.
  objectiveC as objectiveCLanguage,
  ~~~~~~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:116:3

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'objectiveCpp'.
  objectiveCpp as objectiveCppLanguage,
  ~~~~~~~~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:117:3

TS2305 [ERROR]: Module '"internal:///missing_dependency.d.ts"' has no exported member 'scala'.
  scala as scalaLanguage,
  ~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/common/deps.ts:118:3

TS2339 [ERROR]: Property 'on' does not exist on type 'WebsocketProvider'.
    this.collabProvider.on("status", (e: any) => {
                        ~~
    at file:///home/sweisgerber/workspace/silverbullet/web/cm_plugins/collab.ts:28:25

TS2339 [ERROR]: Property 'on' does not exist on type 'WebsocketProvider'.
    this.collabProvider.on("sync", (e: any) => {
                        ~~
    at file:///home/sweisgerber/workspace/silverbullet/web/cm_plugins/collab.ts:31:25

TS2339 [ERROR]: Property 'destroy' does not exist on type 'WebsocketProvider'.
    this.collabProvider.destroy();
                        ~~~~~~~
    at file:///home/sweisgerber/workspace/silverbullet/web/cm_plugins/collab.ts:49:25

TS2339 [ERROR]: Property 'once' does not exist on type 'WebsocketProvider'.
    this.collabState.collabProvider.once("sync", (synced: boolean) => {
                                    ~~~~
    at file:///home/sweisgerber/workspace/silverbullet/web/editor.tsx:1291:37

Found 25 errors.
zefhemel commented 1 year ago

Is this still happening? This may be due to caching, if you're on Linux (looks that way) could you try to rm -rf ~/.cache/deno and try again?

sweisgerber commented 1 year ago

Thanks, building works now after removing the deno cache :clap: