Edex-ui: build failure?

Created on 8 Nov 2019  路  12Comments  路  Source: GitSquared/edex-ui

I can't seem to get the build process to work on my machine. I want to help find bugs in the newest versions and since the last release is quite a while ago, I am trying to build myself.

I installed node.js 13.1.0 and with npm ajv-keywords which seemed to be a dependency.

C:\Users\clragon\Desktop\edex-ui-master>npm run build-windows

> [email protected] prebuild-windows C:\Users\clragon\Desktop\edex-ui-master
> rmdir /S /Q src\node_modules && mkdir prebuild-src && xcopy src\* prebuild-src\ /E /C /Q /Y && node prebuild-minify.js && cd prebuild-src && npm install

The system cannot find the file specified.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] prebuild-windows: `rmdir /S /Q src\node_modules && mkdir prebuild-src && xcopy src\* prebuild-src\ /E /C /Q /Y && node prebuild-minify.js && cd prebuild-src && npm install`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] prebuild-windows 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!     C:\Users\clragon\AppData\Roaming\npm-cache\_logs\2019-11-08T22_14_13_441Z-debug.log

C:\Users\clragon\Desktop\edex-ui-master>

This is what my console output looks like (nothing interesting)

and this is the log file it pointed to:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'D:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build-windows'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild-windows', 'build-windows', 'postbuild-windows' ]
5 info lifecycle [email protected]~prebuild-windows: [email protected]
6 verbose lifecycle [email protected]~prebuild-windows: unsafe-perm in lifecycle true
7 verbose lifecycle [email protected]~prebuild-windows: PATH: D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\clragon\Desktop\edex-ui-master\node_modules\.bin;D:\Program Files\nodejs\;C:\Users\clragon\AppData\Roaming\npm
8 verbose lifecycle [email protected]~prebuild-windows: CWD: C:\Users\clragon\Desktop\edex-ui-master
9 silly lifecycle [email protected]~prebuild-windows: Args: [
9 silly lifecycle   '/d /s /c',
9 silly lifecycle   'rmdir /S /Q src\\node_modules && mkdir prebuild-src && xcopy src\\* prebuild-src\\ /E /C /Q /Y && node prebuild-minify.js && cd prebuild-src && npm install'
9 silly lifecycle ]
10 silly lifecycle [email protected]~prebuild-windows: Returned: code: 2  signal: null
11 info lifecycle [email protected]~prebuild-windows: Failed to exec prebuild-windows script
12 verbose stack Error: [email protected] prebuild-windows: `rmdir /S /Q src\node_modules && mkdir prebuild-src && xcopy src\* prebuild-src\ /E /C /Q /Y && node prebuild-minify.js && cd prebuild-src && npm install`
12 verbose stack Exit status 2
12 verbose stack     at EventEmitter.<anonymous> (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
12 verbose stack     at EventEmitter.emit (events.js:210:5)
12 verbose stack     at ChildProcess.<anonymous> (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
12 verbose stack     at ChildProcess.emit (events.js:210:5)
12 verbose stack     at maybeClose (internal/child_process.js:1028:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
13 verbose pkgid [email protected]
14 verbose cwd C:\Users\clragon\Desktop\edex-ui-master
15 verbose Windows_NT 10.0.18362
16 verbose argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-windows"
17 verbose node v13.1.0
18 verbose npm  v6.12.1
19 error code ELIFECYCLE
20 error errno 2
21 error [email protected] prebuild-windows: `rmdir /S /Q src\node_modules && mkdir prebuild-src && xcopy src\* prebuild-src\ /E /C /Q /Y && node prebuild-minify.js && cd prebuild-src && npm install`
21 error Exit status 2
22 error Failed at the [email protected] prebuild-windows script.
22 error This is probably not a problem with npm. There is likely additional logging output above.
23 verbose exit [ 2, true ]


Doesn't seem like much to me, maybe you know what failed?

question

All 12 comments

Looks to me like rmdir sent an error code because there was no src/node_modules folder to clean up, which halted the whole script.

I don't build on Windows often - actually, I haven't since I got CI builds finally working for win32 - so the package.json build script and/or the readme instructions might be a bit rotten.

Try running npm run install-windows before following the build instructions.

For reference, you can get the working build instructions that are ran on CI here.

Hey!
I'm getting similar issues all over the place. I was actually about to start another issue when I saw this in the recommended area. The build for windows is extremely inconsistent. If I'm going to build per TravisCI's config, do I run all of those commands, in order, via elevated CMD in the root build directory?

My issues are as follows:
The Original Console Error from running npm run install-windows
The first outputted "run" log in my log files
The second outputted "run" log in my log files

If either @clragon or @GitSquared could help, it would be much appreciated.

Update: Following TravisCI's instruction's I've gotten this far:

Me Running NPM Install - successful - and running the Electron Build - failing - Shows the Errors from Electron Build
Electron Build Error Log - Linked from the previous error on Electron Build

As you can see, I'm still receiving errors out the wazoo, but at least making progress.

@RHQ-Rusty Since you're building edex v2.2.2, try using node 8 instead of 12.

Link to New Errors - These are the errors shown. I uninstalled Node.js 12.14.0, re-installed Node.js 8.17.0 and ran all of the build instructions. The only error I am getting now is during the final run of the electron builder. Any further guidance @GitSquared ?

gyp ERR! stack Error: 403 status code downloading arm64 node.lib

I'm not sure why it's trying to fetch arm libs... perhaps something in your ENV is messing up with the arch detection of electron-rebuild. You're not actually on arm, are you?

Regardless, why are you trying to build v2? Prebuilt binaries are available for released versions, including for windows.

Also,

I uninstalled Node.js 12.14.0, re-installed Node.js 8.17.0

You should really look into setting up a node version manager like NVM.

I'm not sure why it's trying to fetch arm libs... perhaps something in your ENV is messing up with the arch detection of electron-rebuild. You're not actually on arm, are you?

Windows 10, 64-Bit, Latest Update. How can I check / fix / repair my ENV?

Regardless, why are you trying to build v2?

I'm trying to make some improvements and demo them before making the pull requests so I can see the results on my machine first.

You should really look into setting up a node version manager like NVM.

Will do!

@RHQ-Rusty If you're thinking about sending a PR, you should build and diff against the latest master (v3.0.0-pre). It's currently >100 commits changed since v2.2.2 so I won't be able to accept PRs against v2.

Building the dev version can be done using node 12. You'll need to clone the repo.

@GitSquared If you could add me on Discord that'd be much appreciated; when I was getting errors originally it was on Node.js 12.14.0 and with the pre-3.0.0 (raw master branch) build of sourcecode, same shit that happened before is happening again. I'm tempted to instantiate my own TravisCI for implementing builds for my edits and changes until I can see the desired results.

@RHQ-Rusty You didn't tell me you tried to build v3 first. All the logs you sent were v2 logs.

You won't be able to do anything since #664 popped up though. I'm fixing this one and I'll get back to you.

@GitSquared If I build it with 2.2.2 on Node.js v8.17 through the Node.js Command Prompt, do you think it would work? I've been doing it in the Windows default terminal the entire time; it's a possibility this is what was causing my path/environment issues.

I'm fixing this one and I'll get back to you.

Take your time man, worry about that issue. I've resolved my problems.

@GitSquared If I build it with 2.2.2 on Node.js v8.17 through the Node.js Command Prompt, do you think it would work? I've been doing it in the Windows default terminal the entire time; it's a possibility this is what was causing my path/environment issues.

FIX: This was my issue. The entire time, I should've been running this through the Node.js terminal.

Was this page helpful?
0 / 5 - 0 ratings