New to npm - please help with install and start

Hello everyone,

I would be grateful if somebody could help me with this.
When I want to start npm with the npm start command in terminal, I get:

ubuntu:~/photo-booth$ npm start
ubuntu@philipptrenz/photo-booth@1.4.4 start /home/j/photo-booth
electron .
sh: 1: electron: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! philipptrenz/photo-booth@1.4.4 start: electron .
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the philipptrenz/photo-booth@1.4.4 start 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?

When I try to install node_modules I get this:

ubuntu:~/photo-booth$ sudo npm install -g node-modules
[sudo] Passwort für j:
npm WARN deprecated hawk@1.0.0: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions.
npm WARN deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy. Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions.
npm WARN deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy. Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions.
npm WARN deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys
/usr/bin/node-modules -> /usr/lib/node_modules/node-modules/app.js

  • node-modules@1.0.1
    added 41 packages from 33 contributors in 1.44s

I got the photo booth script from Github, it should be working.

Thank you for your support!

you forgot to run npm install

npm install

Hm.
I think as long as the terminal knows the command npm start it looks as if npm is installed, isn’t it?
Thanks for your reply anyway!

That command does not install npm, it asks npm to install all of the dependencies your package needs. They get installed into the node_modules folder. The error messages suggest you have not run this.

Repeating the documentation link that godmar already included, more visible this time:

https://docs.npmjs.com/cli/install

(You may have thought you were doing this with

npm install -g node-modules

but that installs a package called node_modules globally, which is unlikely to be what you wanted or needed!)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.