I’m trying to use Tailwind in my react project. In...
# help
d
I’m trying to use Tailwind in my react project. In order to build you need to run
"build": "craco build",
instead of
"build": "react-scripts build",
. For some reason in Seed.run my unit tests fail for the react site. They don’t fail locally. Anyone else encounter this?
Here’s the error log.
Copy code
FAIL test/MyStack.test.js (79.653 s)
  ● Console
    console.log
      Building Lambda function src/lambda.handler
      at builder (node_modules/@serverless-stack/resources/src/util/nodeBuilder.ts:127:11)
          at Array.forEach (<anonymous>)
    console.log
      Building static site frontend
      at ReactStaticSite.buildApp (node_modules/@serverless-stack/resources/src/StaticSite.ts:181:17)
  ● Test Stack
    There was a problem building the "ReactSite" StaticSite.
      26 |     ]);
      27 |
    > 28 |     const reactApp = new sst.ReactStaticSite(this, "ReactSite", {
         |                      ^
      29 |       path: "frontend",
      30 |       environment: {
      31 |         REACT_APP_API_URL: api.url,
      at ReactStaticSite.buildApp (node_modules/@serverless-stack/resources/src/StaticSite.ts:191:15)
      at new StaticSite (node_modules/@serverless-stack/resources/src/StaticSite.ts:93:24)
      at new ReactStaticSite (node_modules/@serverless-stack/resources/src/ReactStaticSite.ts:43:5)
      at new MyStack (stacks/MyStack.js:28:22)
      at Object.<anonymous> (test/MyStack.test.js:8:17)
f
Hey @Devin, if you don’t run the unit tests, does
sst build
work on SEED?
d
let me check!
If I don’t run the tests, it deploys
the tests work locally however
Finally had some time to look at this. It was a lint failure. I read the error message but didn’t think that the lint step was part of the test step, so I thought it was a warning, not an error. My bad! Thanks for all your help.
f
Oh I see. Glad u figured it out!