Skip to content
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

Problem: error installing front-end dependencies in playbooks/archivematica #56

Closed
jraddaoui opened this issue Mar 20, 2018 · 5 comments

Comments

@jraddaoui
Copy link
Contributor

Using master at 86d70f4 without any changes, vagrant up fails in the following task:

TASK [artefactual.archivematica-src : Install front-end dependencies] **********
changed: [am-local] => (item=/vagrant/src/archivematica/src/dashboard/frontend/appraisal-tab)
failed: [am-local] (item=/vagrant/src/archivematica/src/dashboard/frontend/transfer-browser) => {"changed": true, "cmd": ["npm", "install"], "delta": "0:00:16.859546", "end": "2018-03-20 15:43:55.774615", "item": "/vagrant/src/archivematica/src/dashboard/frontend/transfer-browser", "msg": "non-zero return code", "rc": 1, "start": "2018-03-20 15:43:38.915069", "stderr": "npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.\nnpm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.\nnpm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.\nsh: 1: webpack: not found\nnpm ERR! file sh\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno ENOENT\nnpm ERR! syscall spawn\nnpm ERR! transfer-browse@0.0.0 prepublish: `webpack --progress --colors --entry ./app.js`\nnpm ERR! spawn ENOENT\nnpm ERR! \nnpm ERR! Failed at the transfer-browse@0.0.0 prepublish script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR!     /var/lib/archivematica/.npm/_logs/2018-03-20T15_43_55_756Z-debug.log", "stderr_lines": ["npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.", "npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.", "npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.", "sh: 1: webpack: not found", "npm ERR! file sh", "npm ERR! code ELIFECYCLE", "npm ERR! errno ENOENT", "npm ERR! syscall spawn", "npm ERR! transfer-browse@0.0.0 prepublish: `webpack --progress --colors --entry ./app.js`", "npm ERR! spawn ENOENT", "npm ERR! ", "npm ERR! Failed at the transfer-browse@0.0.0 prepublish script.", "npm ERR! This is probably not a problem with npm. There is likely additional logging output above.", "", "npm ERR! A complete log of this run can be found in:", "npm ERR!     /var/lib/archivematica/.npm/_logs/2018-03-20T15_43_55_756Z-debug.log"], "stdout": "\n> transfer-browse@0.0.0 prepublish /vagrant/src/archivematica/src/dashboard/frontend/transfer-browser\n> webpack --progress --colors --entry ./app.js", "stdout_lines": ["", "> transfer-browse@0.0.0 prepublish /vagrant/src/archivematica/src/dashboard/frontend/transfer-browser", "> webpack --progress --colors --entry ./app.js"]}
@jraddaoui
Copy link
Contributor Author

It looks like a webpack issue, but we have almost the same dependencies and process in the appraisal-tab, where it works.

> transfer-browse@0.0.0 prepublish /vagrant/src/archivematica/src/dashboard/frontend/transfer-browser
> webpack --progress --colors --entry ./app.js

sh: 1: webpack: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! transfer-browse@0.0.0 prepublish: `webpack --progress --colors --entry ./app.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the transfer-browse@0.0.0 prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@jraddaoui
Copy link
Contributor Author

Tried from within the vagrant box and it failed too. But, after clearing the npm cache (npm cache clean --force as the archivematica user), it worked.

@sevein
Copy link
Member

sevein commented Mar 20, 2018

Some users had the same issue in the Compose environment!
artefactual-labs/am#49

What would be a good way to fix this?

@jraddaoui
Copy link
Contributor Author

Hi @sevein, I destroyed and created the entire Vagrant box and it worked this time. This seems like one of those random NPM issues. I'll keep digging.

@jraddaoui
Copy link
Contributor Author

Upgrading to Node 9.x didn't make a difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants