frctl / fractal

A tool to help you build and document website component libraries and design systems.
https://fractal.build
MIT License
2.1k stars 167 forks source link

Is Nodejs v18.12.1 LTS supported? Is this module still maintained? html is escaped #1242

Closed OZZlE closed 1 year ago

OZZlE commented 1 year ago

Steps to reproduce the issue

  1. Take over old project from another company :D
  2. Update from Nodejs v8.16 to v18.12.1 (LTS)
  3. Update all modules (set version "*" in package.json, delete node_modules, npm install, set fixed versions again), including babel
  4. (Update from React v16 to v18 - Non React components don't work either though)

Reproduces how often:

100%

Reduced test case

All components html only/Vanilla js/jQuery/React all becomes just html string when opened:

fractal-issue

No errors in CMD/command line or in browser console so quite hard to debug, don't know where the parsing and output parts happens.

https://gist.github.com/OZZlE/fractal.jss

Context

Is this module still maintained?

OZZlE commented 1 year ago

package.json relevant parts:

{
  "scripts": {
    "run:fractal": "node ./server.js",
    "run:webpack": "webpack-dev-server --env=development --config webpack.config.styleguide.js",
    "start": "npm-run-all --parallel run:fractal run:webpack", // <!---------- runs styleguide
  },
  "devDependencies": {
    "npm-run-all": "^4.1.5",
  }
}
LeBenLeBen commented 1 year ago

@OZZlE Which adapter are you using?

OZZlE commented 1 year ago

@OZZlE Which adapter are you using?

@LeBenLeBen I don't know, how do I find out?

OZZlE commented 1 year ago

Dunno if this helps but maybe:

Before update:

"@frctl/fractal": "^1.1.7",
"@frctl/nunjucks": "^1.0.3",

After update

"@frctl/fractal": "^1.5.14",
"@frctl/nunjucks": "^2.0.15",
OZZlE commented 1 year ago

I just changed back to "@frctl/nunjucks": "^1.0.3", and it seems everything works :)

LeBenLeBen commented 1 year ago

@OZZlE Yes, your adapter is Nunjucks. As you can see, you did a major update from 1 to 2. This update has breaking changes and you need to adapt some parts so the HTML is not escaped. This is documented on the Nunjucks adapter README.