civicrm / civicrm-buildkit-vagrant

MIT License
21 stars 19 forks source link

Is this project still supported? #29

Closed gobnat closed 6 years ago

gobnat commented 6 years ago

I have been experimenting with using this project to build my CiviCRM dev environment but it appears to produce a large number of errors when run and does not appear able to produce a functional vagrant VM for CiviCRM development at this stage.

Are there any plans to update this project - I think it is a great project btw good work - or is that unlikely at this stage?

This project is currently still listed as the default Vagrant based development tool at docs.civicrm.org.

mattwire commented 6 years ago

It is minimally supported and I'm happy to merge patches for any issues you find. It does work for me - what are the errors you are coming up with?

gobnat commented 6 years ago

Running: Vagrant 1.9.1 Ubuntu 16.04.3 LTS

Most errors relate to npm and node. Similar to #23

eg:

npm WARN npm npm does not support Node.js v5.12.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'node-gyp/bin/node-gyp'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2018-02-19T05_21_35_201Z-debug.log

I did tinker with manually fixing the install - which appears to have some conflicts - but buildkit is broken once the VM is up and running and not producing dev environments as in #23 .

issue #18 is also still occurring.

Some other warnings regarding depreciated commands are appearing but I don't think that is breaking anything as yet.

mattwire commented 6 years ago

@gobnat Happy to work with you to get it working... I've just merged a couple of changes in that should fix #18 and upgrade node to v8. Can you try provisioning again and see how you get on.

gobnat commented 6 years ago

Thanks for your efforts @mattwire !

so, fresh clone and vagrant up.

The solution added for #18 is not working. i still had to manually create the directory after the vagrant up was done and then re-provision to get it working.

Node and npm are working however the error has reduced to:

npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'node-gyp/bin/node-gyp'

Attempting to manuall install this module, say with npm install -g node-gyp throws the same error and fails.

I have tried re-installing npm and nodejs manually but the problem persists. If I understand civibuild correctly it uses npm so the above error would explain why the buildkit on the VM is not functional.

mattwire commented 6 years ago

I notice you're on 16.04 - vagrant should pull in 14.04 by default I think, at least that's what I'm on.

At what point are you seeing the npm error - when I do a vagrant up --provision I don't think I see that.

gobnat commented 6 years ago

I notice you're on 16.04 - vagrant should pull in 14.04 by default I think, at least that's what I'm on.

At what point are you seeing the npm error - when I do a vagrant up --provision I don't think I see that.

The VM is definitely 14.04 Trusty.

I see the error whenever npm is called. Including during the provisioning.

Looking through the errors I do see a warning that nodejs-dev is being removed and it is required by node-gyp. Attempting to manually install it through apt-get gives the following error:

The following packages have unmet dependencies:
 nodejs-dev : Depends: nodejs (= 0.10.25~dfsg2-2ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Not sure if that actually has anything to do with it but it was the only reference to that module in the error log.

gobnat commented 6 years ago

I have it "sort of working"

I had to:

  1. purge nodejs and npm
  2. run the provision.sh script with sudo from within the vm vagrant ssh
  3. Update all the repositories
  4. manually re-install nodejs (I may have had to purge again...) with apt-get

After that, the civibuild is building the template sites included with the project.

mattwire commented 6 years ago

@gobnat Can you try again? Run vagrant destroy and the vagrant up --provision

I've stopped it installing the dist version of npm and left it to the nodejs script to install it. That seems to give me a clean build...

gobnat commented 6 years ago

@mattwire I can confirm a fresh clone and vagrant up works perfectly now thank you so much for your time and help