Anyone else using forklift devel w/ sshfs?

Up until a couple weeks ago, my devel setup was to use sshfs to mount my laptop’s github checkouts into a forklift devel vagrant vm. Something changed, as I updated packages on my fedora-27 laptop, in that npm install no longer works when katello is sshfs mounted in. Does anyone else use this pattern for devel?

The error I get is “npm ERR! tar.unpack untar error /home/vagrant/.npm/…”. Both @Justin_Sherrill and @akofink have tried to help out over this past week without luck.

My question, then, is how do other devs work? I’ve heard suggestions that I should mount the vm dir onto my laptop, instead of the opposite. That implies that any code changes in the vm will be lost on reset; is that what others do though?

Something definitely changed, whether on the laptop, vm, or dependencies. If I knew what, maybe I could roll back and return to work.

I think I ran into a similar issue recently, but I’m now on a new laptop so can’t verify. IIRC, the issue was that the npm or node version shipping with centos was too old or something, and it was fixed by installing newer versions from nodesource - https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora

Much closer to working, thanks!

Following the setup_8.x instructions everything installs except ajv. Note the indicated log files below don’t exist, this is all the info available.

[vagrant@devel foreman]$ npm install
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! Cannot read property '0' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2018-07-15T19_58_01_455Z-debug.log

[vagrant@devel foreman]$ npm install ajv
npm WARN babel-loader@7.1.5 requires a peer of webpack@2 || 3 || 4 but none is installed. You must install peer dependencies yourself.
npm WARN compression-webpack-plugin@1.1.11 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN lodash-webpack-plugin@0.11.5 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-redux@5.0.7 requires a peer of redux@^2.0.0 || ^3.0.0 || ^4.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN table-resolver@3.3.0 requires a peer of redux@>= 3.0.0 < 4.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! Cannot read property '0' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2018-07-15T20_02_59_954Z-debug.log

I haven’t encountered this type of error, but I use sshfs to mount the vm dir onto my laptop. The code loss is not an issue for me as I do not reset the devel box - at least not intentionally. The main disadvantage is that I must sometimes prod Sublime to reload changed files when switching between branches with many changes (rpm vs deb branches in foreman_packaging)

I tried to ‘npm install’ today with the 8.11.3, but everything worked. I also use nvm, it makes switching between node versions much easier.

What is your SSHFS mount configuration? Do you have /home/vagrant as the mount point? Did you look for selinux errors in audit.log?

I mount my source checkouts to /home/vagrant/git and running foreman out of there without issue over NFS per the instructions at https://github.com/theforeman/forklift#using-nfs-to-share-folders.

1 Like

Using nfs instead of sshfs worked. Thanks @stbenjam!!