Hi. I just finished the excellent guide and wanted...
# help
m
Hi. I just finished the excellent guide and wanted to replace the React frontend with one implemented in Nuxt/Vue. Started by moving
frontend
to a safe place and a
npx create-nuxt-app frontend
, then changed FrontendStack.js to use StaticSite with appropriately changed buildOutput and buildCommand values in the props object. Tried to deploy through SEED and it fails during the unit tests in frontend, complaining that it "Cannot find module '{ATSYMBOL}vue/test-utils'". (Slack keeps replacing my text with a user's name.) Locally, a
npm run test
fails with a similar "Cannot find module '@/components/NuxtLogo.vue' [...]". I think this is just a Jest issue with nested projects.
Thanks @Frank. Yes, it seems like Jest either doesn't understand, or needs some configuration to properly handle sub-projects. I'm just turfing the problem test until I can get some time to figure out a scheme that works.
Yes. I think that even I could get Jest to work with the layout you guys outlined in the graphql-stack, which is actually my preferred layout. Now if I could just figure out why using
import
worked in the notes app with
sst test
but not
jest
... There's a lot of sick going around lately. Weird. 😉 Hope @thdxr makes a quick recovery, along with everyone else.
d
In my case, the "Unknown script "test" error was fixed by rolling-back node-fetch from 3.2.6 to 2.6.1.
a
Ah, yes I think v3 went ES modules. This is an annoying time in the Javascript ecosystem. 😞