lerna/getting-started-example

[ERROR] Could not resolve "footer" while running remix app

Closed this issue · 5 comments

When checkout out the repo and doing install in each of packages, when I run npx lerna run dev --scope=remixapp, getting this error:

> remixapp@ dev D:\lerna-projects\lerna-work-please\getting-started-example\packages\remixapp
> remix dev
Watching Remix app in development mode...
X [ERROR] Could not resolve "footer"
    app/routes/index.tsx:2:21:
      2 │ import {Footer} from 'footer';
        ╵                      ~~~~~~~~
  You can mark the path "footer" as external to exclude it from the bundle, which will remove this error.
Build failed with 1 error:
app/routes/index.tsx:2:21: ERROR: Could not resolve "footer"

Node version: v14.17.0
Platform: Windows

the same problem...

Same problem when trying to follow the getting-started guide when using node 14.20.0. Works when using node 18.11.0

@aymanapatel You should build the footer and header packages (e.g. npx lerna run build --scope=footer) before you run the npx lerna run dev --scope=remixapp

Hello aymanapatel i had the same issue typescipt was not able to resolve definition files what woked for me is to adjust tsconfig.json like this:

  • option 1:

    "baseurl": "../"

  • option 2:
    "baseurl": "." "paths": { "footer": ["../footer"], "header": ["../header"] }

Closing this issue as it appears to have been fixed in #18. Feel free to follow up if anyone is still experiencing this issue.