obsidianmd/obsidian-sample-plugin

[BUG] Failed to compile on Linux Pop!_OS 22.04 LTS

Closed this issue · 2 comments

Expected behaviour

The code compiles and runs

What Actually happened

The code didn't run and I got this error


> obsidian-sample-plugin@1.0.0 build
> tsc -noEmit -skipLibCheck && node esbuild.config.mjs production

file:///home/fffluoride/Desktop/TEST/.obsidian/plugins/obsidian-sample-plugin/esbuild.config.mjs:14
const context = await esbuild.context({
                ^^^^^

SyntaxError: Unexpected reserved word
    at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
    at async link (internal/modules/esm/module_job.js:42:21)

Steps to reproduce

  1. Installed node, and npm from my package manager
  2. Clone the repository and run the commands in the obsidian docs - https://docs.obsidian.md/Plugins/Getting+started/Build+a+plugin#Step+1+Download+the+sample+plugin
  3. Build the plugin - https://docs.obsidian.md/Plugins/Getting+started/Build+a+plugin#Step+2+Build+the+plugin
  4. It didn't work :(
lishid commented

You need to install a newer version of NodeJS.

Thank you. Update the docs?