Can't get `rabbit-ear` dependency to resolve.
Closed this issue · 4 comments
Hi, I'm excited about the idea of this app, and I would like to contribute, however I can't get it to run as I can't get the rabbit-ear
dependency to work, see screenshot below. I wonder if you could spot my mistake?
I have the latest nightly dev
branch from rabbit-ear/rabbit-ear
checked out side-by-side with this repository. I have also tried changing the path in package.json to "rabbit-ear": "file:../rabbit-ear"
and tried changing it to an absolute path, but this didn't work. I also tried adding /src
to the path, since that seems to be the real root for this package, according to the imports. After all these changes I ran npm install
again. However, nothing I have tried has worked.
Am I missing some system-wide configuration or something else undocumented in the README?
Here is some diagnostic info that may help, thank you for any help with this!
$ npm --version
10.7.0
$ node --version
v22.1.0
$ git log --pretty=oneline -n1
c935dc4f7c9aca274f51434876266f81c3b4c844 (HEAD -> main, origin/main, origin/HEAD) incorporate new rabbit ear version, cycles rendering, new planarize method
$ cd ../rabbit-ear
$ git log --pretty=oneline -n1
2bc29cb2b01752f3e7c37443375dcfc2ecb43c83 (HEAD -> dev, origin/dev) new scripts folder, bundle shaders in build, type doc style
$ tree -L 2
.
├── rabbit-ear
│ ├── changelog.md
│ ├── license
│ ├── node_modules
│ ├── package-lock.json
│ ├── package.json
│ ├── readme.md
│ ├── rollup.config.js
│ ├── scripts
│ ├── src
│ ├── tests
│ ├── tsconfig.json
│ └── typedoc.config.json
└── rabbit-ear-app
├── contributions.md
├── index.html
├── jsconfig.json
├── node_modules
├── package-lock.json
├── package.json
├── package.json.old
├── public
├── readme.md
├── src
├── src-tauri
├── svelte.config.js
├── tests
└── vite.config.js
I also tried adding an alias to the rabbit-ear module in vite.config.js
and this got rid of the original error message, however the app now can't load any of the files from the server (see screenshot below).
...
export default defineConfig(async () => ({
resolve: {
alias: {
'rabbit-ear': '../rabbit-ear/src',
},
},
... (trucated for brevity)
@samsalisbury The readme is a bit unclear. What worked for me was to just use npm link
:
- Clone and build the dev branch of the rabbit-ear repo:
# Clone the rabbit-ear repo
git clone https://github.com/rabbit-ear/rabbit-ear.git
cd rabbit-ear
# Checkout the dev branch
git checkout dev
# Build the module
npm run build
# Register the module so it can be linked
npm link
- Run
npm link rabbit-ear
in therabbit-ear-app
folder
Now when you build, it should open properly. I'll open a PR to update the readme
Thank you! That worked :)
Hello @samsalisbury and @zacharyfmarion I am so sorry I wasn't watching this repo very closely. I'm currently merging all of Zachary's PRs, and very happy to have you all along. lmk if you have any other questions.