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

Cannot use import statement outside a module #10013

Open
pxue opened this issue Sep 21, 2024 · 1 comment
Open

Cannot use import statement outside a module #10013

pxue opened this issue Sep 21, 2024 · 1 comment

Comments

@pxue
Copy link

pxue commented Sep 21, 2024

Reproduction

  1. yarn add @react-three/cannon
  2. import { Physics } from "@react-three/cannon"

System Info

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M3
    Memory: 152.11 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.2 - ~/.nvm/versions/node/v18.20.2/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v18.20.2/bin/npm
    pnpm: 8.15.7 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 128.0.6613.138
    Safari: 17.4.1
  npmPackages:
    @remix-run/dev: ^2.12.0 => 2.12.0
    @remix-run/node: ^2.12.0 => 2.12.0
    @remix-run/react: ^2.12.0 => 2.12.0
    @remix-run/serve: ^2.12.0 => 2.12.0
    vite: ^5.1.0 => 5.4.4

Used Package Manager

yarn

Expected Behavior

Should not produce error.

Works fine with Vite standalone, example repo works fine here:

https://github.com/pmndrs/use-cannon/tree/master/packages/react-three-cannon-examples

Actual Behavior

Screenshot 2024-09-21 at 6 35 38 PM
@brophdawg11
Copy link
Contributor

Have you checked out this section of the docs to see if that helps debugging the issue?

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

No branches or pull requests

2 participants