Tresjs / cientos

Collection of useful helpers and fully functional, ready-made abstractions for TresJS
https://cientos.tresjs.org/
MIT License
251 stars 37 forks source link

Could not resolve "@tweakpane/plugin-essentials" since at least Cientos 3.1.0 #179

Closed bperel closed 11 months ago

bperel commented 11 months ago

Describe the bug

I am doing: vite I expect: vite to load without error, like it did for cientos < 3 What is actually happening:

  VITE v4.4.9  ready in 1502 ms

  ➜  Local:   http://127.0.0.1:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help
Could not resolve "@tweakpane/plugin-essentials"

    node_modules/.pnpm/@tresjs+cientos@3.1.0_three@0.154.0_tweakpane@4.0.0_vue@3.3.4/node_modules/@tresjs/cientos/dist/trescientos.js:15:20:
      15 │ import * as xo from "@tweakpane/plugin-essentials";
         ╵                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@tweakpane/plugin-essentials" as external to exclude it from the bundle,
  which will remove this error.

 ELIFECYCLE  Command failed with exit code

Reproduction

https://stackblitz.com/edit/tresjs-basic-hkgcpb?file=package.json

Steps to reproduce

npm install && npm run dev

System Info

No response

Used Package Manager

npm

Code of Conduct

alvarosabu commented 11 months ago

Since v3.1.0 tweakpane and @tweakpane/plugin-essentials are not longer part of the bundle, they need to be installed as peer dep, just install the package

bperel commented 11 months ago

Since v3.1.0 tweakpane and @tweakpane/plugin-essentials are not longer part of the bundle, they need to be installed as peer dep, just install the package

In that case should it be part of the installation documentation? In the Stackblitz I don't use Tweakpane so I didn't expect to need to install this dependency

alvarosabu commented 11 months ago

@bperel we are going to start deprecating useTweakpane from cientos, for now the fix above will prevent your code from breaking, you can continue by using @tresjs/cientos@next or waiting for the PR to be merged