I’m updating a Trellis instance. The initial provision and deployment works fine. However, after migrating the previous database, an error keeps occurring during deployment:
- name: Install Composer dependencies
command: composer install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader --no-scripts
args:
chdir: "{{ deploy_helper.new_release_path }}/web/app/themes/sage"
- name: Run npm install
command: npm install
connection: local
args:
chdir: "{{ project.local_path }}/web/app/themes/sage"
- name: Run npm build
command: npm run build:production
connection: local
args:
chdir: "{{ project.local_path }}/web/app/themes/sage"
- name: Copy project local files
synchronize:
src: "{{ project.local_path }}/web/app/themes/sage/dist"
dest: "{{ deploy_helper.new_release_path }}/web/app/themes/sage"
group: no
owner: no
rsync_opts: --chmod=Du=rwx,--chmod=Dg=rx,--chmod=Do=rx,-- chmod=Fu=rw,--chmod=Fg=r,--chmod=Fo=r
I ran npm install on the server and was told that The program 'npm' is currently not installed.. So, I installed npm and then ran npm install again. It went through the installation process, but then hit an error at:
npm ERR! Error: No compatible version found: monkey-hot-loader@'github:rmarscher/monkey-hot-loader#webpack2-import'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.2","0.0.3"]
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:719:10)
npm ERR! at /usr/share/npm/lib/cache.js:638:10
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/lib/nodejs/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Linux 4.4.0-45-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /srv/www/#####/releases/20161028131811/web/app/themes/sage
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
For reference, this is part of setting up a staging site after upgrading the Roots stack from a previous version. This includes migrating from Sage 8 to 9 (alpha 3). Everything appears to work properly in the local dev environment and during the initial staging provision / deploy.
So, I rebuilt the stack step by step and migrated the previous version of the db. It seems to be working now. No more npm deployment errors. Wondering if one of the extra npm packages was causing an issue…