Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - [SSR-Remix] - [Not supported??] #9566

Closed
hiql opened this issue Sep 5, 2023 · 7 comments
Closed

Bug - [SSR-Remix] - [Not supported??] #9566

hiql opened this issue Sep 5, 2023 · 7 comments
Labels

Comments

@hiql
Copy link

hiql commented Sep 5, 2023

Hello, guys:

I hope I can adopt this wonderful works in my projects, so I do the following steps,but did not have success:(


Create the remix app:

npx create-remix@latest

Add the package:

npm install @patternfly/react-core --save

Add some test code:

import { Button } from "@patternfly/react-core";
import type { V2_MetaFunction } from "@remix-run/node";

export const meta: V2_MetaFunction = () => {
  return [
    { title: "New Remix App" },
    { name: "description", content: "Welcome to Remix!" },
  ];
};

export default function Index() {
  return (
    <div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.8" }}>
      <h1>Welcome to Remix</h1>
      <Button>Hello</Button>
      <ul>
        <li>
          <a
            target="_blank"
            href="https://remix.run/tutorials/blog"
            rel="noreferrer"
          >
            15m Quickstart Blog Tutorial
          </a>
        </li>
        <li>
          <a
            target="_blank"
            href="https://remix.run/tutorials/jokes"
            rel="noreferrer"
          >
            Deep Dive Jokes App Tutorial
          </a>
        </li>
        <li>
          <a target="_blank" href="https://remix.run/docs" rel="noreferrer">
            Remix Docs
          </a>
        </li>
      </ul>
    </div>
  );
}

Finally, got some errors:

% npm run dev

> dev
> remix dev


 💿  remix dev

 info  building...
 info  built (1.2s)
/Users/hiql/workspace/demo/pf-demo/node_modules/@patternfly/react-styles/css/components/AboutModalBox/about-modal-box.css:1
.pf-v5-c-about-modal-box {
^

SyntaxError: Unexpected token '.'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1178:20)
    at Module._compile (node:internal/modules/cjs/loader:1220:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Function.Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/Users/hiql/workspace/demo/pf-demo/node_modules/@patternfly/react-styles/css/components/AboutModalBox/about-modal-box.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)

Did I miss something?
Does it work in SSR mode?

@hiql hiql added the bug label Sep 5, 2023
@nicolethoen
Copy link
Contributor

@hiql if you are hoping to use the patternfly React components in a React app, you'll want to run npm install @patternfly/react-core --save and import Button from @patternfly/reac-core.

@patternfly/patternfly is our HTML/CSS code for PatternFly

@hiql
Copy link
Author

hiql commented Sep 5, 2023

@nicolethoen
Sorry! my typos.
I actually use the @patternfly/react-core.

@hiql
Copy link
Author

hiql commented Sep 11, 2023

Doesn't anyone care about server-side rendering???

😂

@nicolethoen
Copy link
Contributor

I don't have any experience with create-remix. But it looks like out of the box, it's not configured to recognize CSS. I wonder if you need to look at using something like https://remix.run/docs/en/main/styling/bundling to configure proper CSS bundling or something like that?

Copy link

stale bot commented Dec 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Dec 9, 2023
@stale stale bot closed this as completed Dec 23, 2023
@fallmo
Copy link

fallmo commented Aug 22, 2024

@hiql hey, did you end up finding a solution?

@hiql
Copy link
Author

hiql commented Aug 23, 2024

@hiql hey, did you end up finding a solution?

No, I've given up, and I'm using antd now 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants