-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
fix: use yarn link instead of yalc in Dockerfile.contrib #181
Conversation
Pull Request Test Coverage Report for Build 474459310
💛 - Coveralls |
I wasn't able to get yarn link work great when I tried it. I'll try again tomorrow. 😊 |
I’ll try to build one later and see. Also I find it hilarious that you don’t know how to run docker. (Which I resisted for a long time but it ends up being super useful.) |
@AlCalzone Two things. First, this image does not start when built with the node-zwave-js master branch. Error message below. That master branch does start when built with #84, so is this just a zwave version mismatch? (Boy I'll be glad when fix#23 is finally merged...) Second: I dropped into the container and I can confirm that it only contains one copy of the device files, in node_modules/@zwave-js/config/config/devices/
|
I just rebuilt my bridge controller branch, and the duplicate copy of the config folder is gone, though it doesn't appear to be using my the config folder from my branch at all, and is now pulling the only copy of config from some upstream (maybe node latest) |
@jcam I'm surprised it starts for you at all. What build command did you use? |
I'm building against https://github.com/jcam/node-zwave-js/tree/bridge-application-command which was rebased against master yesterday, so it doesn't have any of the commits after ci: disable index update bot command though, that is only two commits and neither of them should have had any effect on your error... odd... |
Are you sure you're building against master? that seems to have some of the unfinished logging code in the error? sort of related, are any of y'all on slack or discord? |
And I just double checked. And they were brand new clones from minutes ago. I'm on the zwave2mqtt slack channel |
I'm going to try forking and merging in both fix#23 and this PR, then build that against the master node-zwave-js. |
@AlCalzone I've run this down. You are removing:
Instead of removing those entirely changing:
fixes this and causes the correct device files to be in the correct place when the cp command is later run. I've built an image off this and it works. I'm unsure if @zwave-js/shared or @zwave-js/serial should also be linked vs added/removed. |
@blhoward2 the strange thing is - if I work locally on my PC without docker, I don't even need to link @zwave-js/core. Think I'm going to add all links just to be sure. |
@blhoward2 try now please |
Do you have the up-to-date core and device files being used though? It’ll start with just building Zwavejs2mqtt because it pulls in the alpha release as a dependency. It’s just not using the master branch. Or are you copying node-zwave-js into the final folder manually, which overwrites them? That’s all this seems to do. It dynamically maps them into the Zwavejs2mqtt folder so they’re in position when you issue the final cp. You could instead cp those folders from node-zwave-js and then not copy them from Zwavejs2mqtt. It’s a sequence thing so anytime you subsequently build node-zwave-js and copy it into position without touching Zwavejs2mqtt you’d fix the problem. Or you’re somehow installing node-zwave-js on a global basis and it’s automatically linking them to satisfy the dependency. Which is sort of how I’d think it would work. |
I'm still seeing issues related to this. I merged the latest zwavejs2mqtt master into this branch, and I also merged fix#23, if that could be related, but I don't think so. In https://github.com/zwave-js/zwavejs2mqtt/blob/master/lib/Constants.js there is a reference: With this latest Dockerfile.contrib update, I'm getting this: TypeError: lookupMeter is not a function |
Just had a though. @AlCalzone would it make more sense to link those in before you ever do the npm install in Zwavejs2mqtt? As it is you end up building node-zwave-js twice. Would that cause npm to see that the dependency is already met? Do we need to list it as a dependency at all if it’s being linked in by the script? Or is that necessary for other installation methods? |
@jcam Which version of node-zwave-js are you building against? I'm building one now based on the cc/hail branch which doesn't include today's merges to see if it is due to one of those. Edit: It starts fine for me based off that older branch. |
I'm building against master + the bridge-application-command commit, as my 700 stick won't work without that commit. |
@robertsLando Is the error above caused by? zwave-js/node-zwave-js@a5d4729 |
…s2mqtt into docker/yarn-link
I changed it again so all packages get linked, just to make sure nothing unnecessary from the original install lingers around |
I haven't been able to reproduce the duplicate config files from #173 yet, but I'm still working on it. |
@AlCalzone is this ready to be merged? |
I think blhoward2 mentioned that it works. But doesn't hurt to have one more confirmation. |
These build updates work for me as well. |
Yep, works good on my end. And I dropped into the container and verified the contents of the image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works on my machine as well. Looks good! :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I guess this could avoid the duplicate config dependencies we're currently seeing. However I couldn't test it since I have no clue how to run the container after executing the command from the docs.
/cc @larstobi
fixes: #173
(I hope)