obsidianmd / obsidian-sample-plugin

2.61k stars 924 forks source link

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

Closed FFFluoride closed 1 year ago

FFFluoride commented 1 year ago

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 1 year ago

You need to install a newer version of NodeJS.

FFFluoride commented 1 year ago

Thank you. Update the docs?