Skip to content
This repository has been archived by the owner on Apr 1, 2021. It is now read-only.

Debian packaging instructions not working #2

Open
JORGETECH opened this issue May 20, 2020 · 4 comments
Open

Debian packaging instructions not working #2

JORGETECH opened this issue May 20, 2020 · 4 comments

Comments

@JORGETECH
Copy link

JORGETECH commented May 20, 2020

When trying the command "npm run-script build" the build fails with this output:

> [email protected] build /home/jorgetech/Temp/TUF-Control
> electron-packager . tufcontrol-electron --platform linux --arch x64 --out dist/

Cannot find module 'electron' from '/home/jorgetech/Temp/TUF-Control'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `electron-packager . tufcontrol-electron --platform linux --arch x64 --out dist/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jorgetech/.npm/_logs/2020-05-20T16_28_04_605Z-debug.log

Output of the debug log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run-script', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/jorgetech/Temp/TUF-Control/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle [email protected]~build: CWD: /home/jorgetech/Temp/TUF-Control
10 silly lifecycle [email protected]~build: Args: [ '-c',
10 silly lifecycle   'electron-packager . tufcontrol-electron --platform linux --arch x64 --out dist/' ]
11 silly lifecycle [email protected]~build: Returned: code: 1  signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: `electron-packager . tufcontrol-electron --platform linux --arch x64 --out dist/`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/jorgetech/Temp/TUF-Control
16 verbose Linux 5.6.13-050613-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run-script" "build"
18 verbose node v10.19.0
19 verbose npm  v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: `electron-packager . tufcontrol-electron --platform linux --arch x64 --out dist/`
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

I'm using Ubuntu 20.04

@ferretwithaberet
Copy link

Not sure if this is the issue, seems like it but he forgot to mention that you need to install the dependencies of the project using npm install in the TUF-control folder, then you can continue from npm run-script build.

@icodelifee
Copy link
Owner

Not sure if this is the issue, seems like it but he forgot to mention that you need to install the dependencies of the project using npm install in the TUF-control folder, then you can continue from npm run-script build.

yea sorry i forgot to mention, i have some commits which i will push after my exams, including packages in release!

@JORGETECH
Copy link
Author

JORGETECH commented Jul 23, 2020

I followed @RadoiAndrei advice and I can confirm the sudo npm install command solves the issue of missing dependencies, it's also a good idea to add sudo to all the npm install commands in the docs since most people are going to use that nowadays (instead of a root shell). Another important observation is that the dist folder in amd64 systems is named "tufcontrol-electron-linux-x64" not "tufcontrol-electron".

The app works great, congratulations @icodelifee !

@ferretwithaberet
Copy link

I followed @RadoiAndrei advice and I can confirm the sudo npm install command solves the issue of missing dependencies, it's also a good idea to add sudo to all the npm install commands in the docs since most people are going to use that nowadays (instead of a root shell). Another important observation is that the dist folder in amd64 systems is named "tufcontrol-electron-linux-x64" not "tufcontrol-electron".

The app works great, congratulations @icodelifee !

sudo is only meant to be used when you want a command to be run as the root user. I for example use node version manager installed locally to my user which doesn't require me to use sudo. If your node is installed on the root user, then sure use sudo, using sudo while not having node installed on the root user will just tell you that the command was not found.

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

No branches or pull requests

3 participants