The most recent attempt was with node v7.7.4 and npm 4.4.1.
The first error is always starts with:
Running "shell:linux64" (shell) task
Error: ENOENT: no such file or directory, open '/home/harvey/Repos/wire-desktop/electron/node_modules/redent/package.json'
at /home/harvey/Repos/wire-desktop/node_modules/electron-builder/src/readInstalled.ts:36:21
The build then soon after aborts with:
Aborted due to warnings.
npm ERR! code ELIFECYCLE
npm ERR! errno 6
npm ERR! wire-desktop@ build:linux: grunt linux-prod
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the wire-desktop@ build:linux script 'grunt linux-prod'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
...
(log attached)
2017-03-23T09_35_27_301Z-debug_log.txt
I've been building wire-desltop up through 2.12.2729 with no issues.
Oh I should add, I follow the README.
git clone https://github.com/wireapp/wire-desktop.git
cd wire-desktop
npm install
npm start
npm test
That all works! It's the next step
# Build for Linux
npm run build:linux
That fails.
@hlwsmith
Sorry, I cannot reproduce this on Debian 8 with node v7.7.4 and npm v4.4.1. Which Linux distribution are you using? Did you make sure that you have enough free disk space (df -h)?
Anyway, these are two possible fixes:
grunt-cli globally: npm i -g grunt-clisudo apt-get install g++-multilib gcc-multilib (for node-gyp).I tried to reproduce last night on Manjaro, but forgot to post a comment. No problems for me either. The error message indicated that one of the NPM modules is missing its package.json file. My recommendation would be to git clean -fdX and start from npm install.
@ConorIA
The error message indicated that one of the NPM modules is missing its package.json file
Yes, that's why I asked about free disk space :)
My recommendation would be to git clean -fdX and start from npm install.
Good idea, but @hlwsmith said he freshly cloned the repo. So no need for git clean IMO.
@ffflorian, right so. I hadn't read very carefully. Does NPM not throw an error when it runs out of disk space?
I've been building wire-desltop up through 2.12.2729 with no issues.
This is why I suggested git clean. I had interpreted that comment to mean that @hlwsmith was building multiple versions in the same local repo. (Which, really, should does work anyway).
@ConorIA I have already seen very strange behaviour on npm side when I am running out of disk space. For example, the first five modules install fine and on the sixth I get an error. AFAIK this behaviour is connected to the fact that npm never knows in advance how many sub-dependencies exist.
I've been building wire-desltop up through 2.12.2729 with no issues.
This is why I suggested git clean. I had interpreted that comment to mean that @hlwsmith was building multiple versions in the same local repo. (Which, really, should does work anyway).
Ah, yes, you are right. I was more focused on his second comment.
Thanks @ffflorian and @ConorIA! The issues was indeed that I needed to do a git clean -fdX as @ConorIA suggested. I actually hadn't started with a clean repo (I copy pasted one too many lines above, sorry for the confusion) and had really started with a git checkout master; git pull as I usually do. It build fine now :+1:
Most helpful comment
I tried to reproduce last night on Manjaro, but forgot to post a comment. No problems for me either. The error message indicated that one of the NPM modules is missing its package.json file. My recommendation would be to
git clean -fdXand start fromnpm install.