giuseppeg / xm

₪ extensible HTML
https://giuseppeg.github.io/xm
326 stars 9 forks source link

`xm dev` throws "fs.rmSync is not a function" #13

Closed bakkerjoeri closed 3 years ago

bakkerjoeri commented 3 years ago

When running xm dev when there's an .xm cache folder present, I get:

(...)/xm/index.js:86
  fs.rmSync(outDir, { recursive: true, force: true });
     ^

TypeError: fs.rmSync is not a function

Could have been introduced by the change on index.js:86 here https://github.com/giuseppeg/xm/compare/v1.0.5...v1.0.6

Steps to reproduce:

  1. Create a basic project, like one from the examples.
  2. Run xm dev
  3. Visit your project once and make sure you now see a .xm folder in the root of your project.
  4. Stop the xm dev process.
  5. Run it again
giuseppeg commented 3 years ago

This is only supported by new versions of node -.- I'll fix it today

giuseppeg commented 3 years ago

fixed in 1.0.7

qubist commented 3 years ago

If anyone's here from searching after having this issue elsewhere, updating node.js fixed it for me.