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

Chapter 8 - Unable to create index.js with spago bundle-app #474

Open
eeoam opened this issue Nov 15, 2024 · 0 comments
Open

Chapter 8 - Unable to create index.js with spago bundle-app #474

eeoam opened this issue Nov 15, 2024 · 0 comments

Comments

@eeoam
Copy link

eeoam commented Nov 15, 2024

Ola!

I have compiled the code for Chapter 8 with spago build successfully, However when I try to create the index.js file with spago bundle-app, I get the following error:

$ spago bundle-app
[info] Build succeeded.
✘ [ERROR] Could not resolve "react"

    output/React.Basic.DOM.Internal/foreign.js:1:18:
      1 │ import React from "react";
        ╵                   ~~~~~~~

  You can mark the path "react" as external to exclude it from the bundle, which will remove this
  error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "react"

    output/React.Basic/foreign.js:1:18:
      1 │ import React from "react";
        ╵                   ~~~~~~~

  You can mark the path "react" as external to exclude it from the bundle, which will remove this
  error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "react-dom"

    output/React.Basic.DOM/foreign.js:3:21:
      3 │ import ReactDOM from "react-dom";
        ╵                      ~~~~~~~~~~~

  You can mark the path "react-dom" as external to exclude it from the bundle, which will remove
  this error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "react"

    output/React.Basic.Hooks/foreign.js:1:18:
      1 │ import React from "react";
        ╵                   ~~~~~~~

  You can mark the path "react" as external to exclude it from the bundle, which will remove this
  error and leave the unresolved path in the bundle.

4 errors
[error] Bundle failed.

Can anyone help figure out what's wrong and how to fix this problem?

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

No branches or pull requests

1 participant