Lit app inside React app not deploying in Netlify

17 views Asked by At

I have a lit app inside a react app. When I try to deploy in Netlify the app I get this error:

build.command from netlify.toml                               
    8:07:44 PM: ────────────────────────────────────────────────────────────────
    8:07:44 PM: ​
    8:07:44 PM: $ npm run build
    8:07:44 PM: > [email protected] build
    8:07:44 PM: > react-scripts build cd src/lit-project-football && npm install
    8:07:46 PM: Creating an optimized production build...
    8:07:51 PM: Failed to compile.
    8:07:51 PM: 
    8:07:51 PM: Module not found: Error: Can"t resolve "lit/directives/style-map.js" in "/opt/build/repo/src/lit-project-football/src"

I import like this, works locally fine:

import { styleMap } from "lit/directives/style-map.js";

You can see I try cd to the src/lit-project-football && npm install on the npm run build of the root package.json

This should install lit that is the nested package.json

Any ideas?

0

There are 0 answers