cozy / cozy-dev

Archived - Please use https://github.com/CPatchane/create-cozy-app
http://cozy.io
Other
17 stars 12 forks source link

cozy-dev deploy with client-side apps #90

Open Phyks opened 8 years ago

Phyks commented 8 years ago

Hi,

I am trying to use cozy-dev with a client-side app. As far as I understood the deploy documentation, I should run

$ cozy-dev deploy dist

from the root of my application (typically the root of https://github.com/Phyks/cozy-RSVP) and where dist is the place where my built files reside in my app folder.

However, I get a

path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received null
  at assertPath (path.js:7:11)
  at Object.relative (path.js:1228:5)
  at /home/phyks/Code/cozy/cozy-dev/lib/application.js:306:39
  at /home/phyks/Code/cozy/cozy-dev/node_modules/parentpath/lib/parentpath.js:45:13
  at FSReqWrap.oncomplete (fs.js:123:15)

The app is installed in my cozy-dev VM, but gets a 404 not found whenever I try to open it.

Thanks

aenario commented 8 years ago

Hi @Phyks ,

Cozy-dev deploy only work for server-side application.

To test client-side application, the easiest way is to use the cozy-dev client-app-proxy <url> command with an online cozy. (like cd my-app && cozy-dev client-app-proxy https://mycozy.cozycloud.cc)

Due to a bug, it unfortunately does not work with the dev VM. We will fix this soon.

Thanks, Romain

Phyks commented 8 years ago

@aenario Thanks for the input, however I still did not manage to get it working ='(

Not sure what this was supposed to mean, but it made me think I should use the command in my first post for a client app ("server-less"). I think this string should be updated if this is not the case :)

If you need to have a deeper look at my app structure (maybe I missed something and it is not supposed to have this layout), it is at https://github.com/Phyks/cozy-RSVP.

Thanks!

Phyks commented 8 years ago

@aenario @m4dz So, I managed to get the deploy working with a client-side app (cozy-music). The issue was that the Vagrantfile was not in one of the parent directory. I think there should be some doc on it and a more explicit error here if dir is undefined/null.

Everything seems to be working fine except the undeploy which is without any effect. I also got a bunch of "an update is available" notifications for the deployed app, but I am not sure where this is coming from.

EDIT: It seems one has to reboot the VM to get the deploy working though.

m4dz commented 8 years ago

Thanks a lot @Phyks, I dully note it for my current work on cozy-dev proxy 😉