riot / ssr

Riot.js node Server Side Rendering
MIT License
32 stars 8 forks source link

Cannot find module '@babel/preset-env' #19

Closed markgarrigan closed 4 years ago

markgarrigan commented 4 years ago

Referencing Closed #15

I can't get past this error...

Cannot find module '@babel/preset-env'

when doing this...

require('@riotjs/ssr/register')({ exts: ['.riot'] }) const render = require('@riotjs/ssr').default const heading = require('heading.riot').default

markgarrigan commented 4 years ago

My package.json dependencies look like this

  "dependencies": {
    "@riotjs/ssr": "^5.0.0",
    "firebase-admin": "^9.1.0",
    "riot": "^4.13.5",
    "stripe": "^6.28.0",
    "swell-node": "^3.1.4"
  }
GianlucaGuarini commented 4 years ago

I can not reproduce the issue. Please check your npm dependencies and eventually run npm ci

https://repl.it/repls/GreenyellowOpulentSort

markgarrigan commented 4 years ago

Thanks @GianlucaGuarini.

I also failed to mention that I was trying to do SSR with netlify and now vercel. Both fail. Netlify fails with the babel error and Vercel fails to import the riot component. I'm assuming it's their issue, not Riot. But if there's ANY way you could try to do a simple SSR example deployed to netlify or vercel that would be amazing. I've been trying for weeks with no success. I don't want to have to go to REACT for SSR.

Thanks again!

GianlucaGuarini commented 4 years ago

Netlify fails with the babel error and Vercel fails to import the riot component

Please contact their support. I don't see any issue in our side having to debug only 3 lines of javascript