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
Hoodie install breaks on my (admittedly unusual) setup #751
Comments
I can see the problem. I would probably do
Yes, I agree. But I’m not sure if that is easily possible. Maybe an error and an |
I'll try to work on the fail gracefully for now. |
@parallaxeffect I just found out that |
Yeah, I don't think PWD is the proper solution for this problem. I was just trying to illustrate that it's the discrepancy between |
Would maybe a nested folder setup like described in https://github.com/boennemann/alle and implemented by PouchDB’s monorepo work for your use case? I think in the future I would get rid of the the |
Yeah, my current work-around is to add a symlink in |
I've been doing my development on Virtual Machines using Vagrant, and I use a symbolic link on the node_modules directory to prevent it from being synced with my host machine. This causes the hoodie install to fail.
Steps to reproduce:
The issue is that setup.js uses
path.resolve('..', '..')
to find the App Root, but that leads to the proxy directory and not the app directory where my package.json lives.I have a workaround, so it's not a high priority issue for me.
One solution that works for my scenario is to use
path.resolve(process.env.PWD, '..', '..')
instead to find the App Root, but I'm not sure if that would break under other setups.In any case, I think the script should fail gracefully if it can't find the package.json where it's expecting. As it is, it's reverting the entire installation after throwing an exception. It should probably just emit a friendly message: "Hey, couldn't find your package.json to add the start script." and exit without reverting the installation.
The text was updated successfully, but these errors were encountered: