quasarframework / quasar-ui-qmarkdown

A Quasar UI App Extension to display inline markdown
https://quasarframework.github.io/quasar-ui-qmarkdown/
MIT License
157 stars 29 forks source link

SSR is not working in 2.0.0-beta.7 #379

Open karimi opened 2 years ago

karimi commented 2 years ago

I'm using @quasar/quasar-app-extension-qmarkdown": "^2.0.0-beta.7" with quasar v2 and Vue3. It works as expected when runningquasar dev However when I try to run quasar dev -m ssr I get the following error:

(node:13486) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/Users/---/Desktop/dev/docify/quasar_site/node_modules/@quasar/quasar-app-extension-qmarkdown/src/boot/register.js:1
import { boot } from 'quasar/wrappers'
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at compileFunction (<anonymous>)
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1032:15)
    at Module._compile (node:internal/modules/cjs/loader:1067:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:168:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
    at async Promise.all (index 0)
error Command failed with exit code 1.

I've installed qmarkdown using quasar cli and I'm suing Node v16.14.0

Thanks

nucle commented 2 years ago

Hi, will take a look. Sorry for the late answer.

BR, nucle

matbjo-dev commented 2 years ago

Any solution to this issue with SSR? Also issue with SSG. Thanks for the plugin.

syserr0r commented 2 years ago

FWIW this only applies if using quasar ext add @quasar/qmarkdown@next, if one manually installs @quasar/quasar-ui-qmarkdown@next and generates a bootfile it works fine in SSR.

HoboDev commented 1 year ago

Do you have an example? I can get it to run either way.

thiu commented 11 months ago

Still no solution for this?

mony-fx commented 7 months ago

Anyone getting this to work ?