sinedied / backslide

:sweat_drops: CLI tool for making HTML presentations with Remark.js using Markdown
https://sinedied.github.io/backslide
MIT License
764 stars 50 forks source link

mime.getType() is not a function #50

Open floswald opened 5 years ago

floswald commented 5 years ago

hi again,

i'm back with something related to #37 and #41. no idea why it stopped working now again - it did work for quite a while:

➜  intro git:(gh-pages) ✗ bs e
0% exporting file 1/1mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
100% exporting file 1/1

   ╭─────────────────────────────────────╮
   │                                     │
   │   Update available 2.3.1 → 2.3.2    │
   │    Run npm i backslide to update    │
   │                                     │
   ╰─────────────────────────────────────╯

➜  intro git:(gh-pages) ✗ npm i backslide
npm WARN saveError ENOENT: no such file or directory, open '/Users/florian.oswald/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/florian.oswald/package.json'
npm WARN florian.oswald No description
npm WARN florian.oswald No repository field.
npm WARN florian.oswald No README data
npm WARN florian.oswald No license field.

+ backslide@2.3.2
updated 1 package and audited 15293 packages in 4.838s
found 3 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
➜  intro git:(gh-pages) ✗ bs e           
0% exporting file 1/1mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
100% exporting file 1/1

the resulting html is missing the included pictures.

argent-smith commented 5 years ago

I have this problem as well, running a dockerized version.

sinedied commented 5 years ago

Strange, I thought this was fixed? I'll take a look as soon as I can

sinedied commented 5 years ago

I did a fresh install of 2.3.2 and I could not reproduce the issue 😕 Can you tell me more about your env? (npm/yarn version, node version, OS/version)

sinedied commented 5 years ago

@floswald From your log, it seems you are missing the global flag to properly update backslide: npm i -g backslide@latest should make sure you have the latest version.

As for the docker version you should contact the maintainer of the image on docker hub, it seems it wasn't updated with the version that have the fix.

argent-smith commented 5 years ago

I retried via yarn install backslide && yarn exec bs export -- successfully. Would appreciate the success in Docker image, too ;)