Skip to content

Shiny Create: React Component fails on npm run build #962

@vivas89

Description

@vivas89

Shiny version: 0.6.1.1
Python version: 3.11.6
Node version: v21.2.0
npm version: 10.2.3

To reproduce:

  1. Run shiny create
  2. Select Custom Javascript Component -> React component.
  3. Name the directory react-component
  4. npm install to install all node packages
  5. npm run build

See the error below.

react-component $ npm run build  

> [email protected] build
> esbuild srcts/index.tsx --bundle --outfile=react_component/distjs/index.js

✘ [ERROR] Could not resolve "@shiny-helpers/react"

    srcts/index.tsx:4:48:
      4 │ import { makeReactInput, makeReactOutput } from "@shiny-helpers/react";
        ╵                                                 ~~~~~~~~~~~~~~~~~~~~~~

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

1 error

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions