Electron works, a bit...? - node.js

I installed the latest version of node and electron and tried out the samples. They work when I enter "npm start".
However: when I try to make an app in another folder and launch it, I get this npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm#3.10.10
3 info using node#v6.11.2
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle proton-template-app#1.0.0~prestart: proton-template-app#1.0.0
6 silly lifecycle proton-template-app#1.0.0~prestart: no script for prestart, continuing
7 info lifecycle proton-template-app#1.0.0~start: proton-template-app#1.0.0
8 verbose lifecycle proton-template-app#1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle proton-template-app#1.0.0~start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/erik/Projects/Electron/tmp2/node_modules/.bin:/home/erik/bin:/home/erik/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
10 verbose lifecycle proton-template-app#1.0.0~start: CWD: /home/erik/Projects/Electron/tmp2
11 silly lifecycle proton-template-app#1.0.0~start: Args: [ '-c', 'electron .' ]
12 info lifecycle proton-template-app#1.0.0~start: Failed to exec start script
13 verbose stack Error: proton-template-app#1.0.0 start: `electron .`
13 verbose stack spawn ENOENT
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:33:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:191:7)
13 verbose stack at maybeClose (internal/child_process.js:891:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
14 verbose pkgid proton-template-app#1.0.0
15 verbose cwd /home/erik/Projects/Electron/tmp2
16 error Linux 4.4.0-79-generic
17 error argv "/usr/bin/node" "/usr/bin/npm" "start"
18 error node v6.11.2
19 error npm v3.10.10
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error proton-template-app#1.0.0 start: `electron .`
24 error spawn ENOENT
25 error Failed at the proton-template-app#1.0.0 start script 'electron .'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the proton-template-app package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error electron .
25 error You can get information on how to open an issue for this project with:
25 error npm bugs proton-template-app
25 error Or if that isn't available, you can get their info via:
25 error npm owner ls proton-template-app
25 error There is likely additional logging output above.
26 verbose exit [ 1, true ]
I'm afraid my install wasn't 100% ok, what should I do? Install again? How do I uninstall correctly? - I'm stuck, please help ;-)

The technicality is in your package.json, and your installation of Electron, but this is regardless of having it saved under dependencies.
If your start script in package.json calls electron ., you will need to install Electron globally with npm install electron -g. This goes for all commands where you use the name, much like mocha and cordova create. Just some examples.
To use it locally (non-globally) and only inside the project, you can just call npm install electron (which you may have done), but your startscript will have to point to the electron file inside the local node_modules folder. Usually the path is node_modules/.bin/electron.cmd, and your start script can look like node_modules/.bin/electron .
If you ever come across this problem inside an IDE, you should set electron.cmd in .bin as your executable, then . as your arguments.

Make sure you have installed electron globally, to do so run the following command:
npm install -g electron
Once you have installed it try running electron in your command prompt it should open a demo app.
To uninstall electron from the global scope:
npm uninstall -g electron

Related

Mac NPM Wrong Version

I am trying to get my project started but I got this error.
Error from Terminal
The environment requires npm 6.x or lower. I checked with Terminal and it does satisfy the required version.
my npm version
I had once installed node v16 using the official installer before but soon I uninstalled it by following the steps I googled (like sudo rm all node-related stuff).
What I had done includes the following:
Clear Cache, Remove package-lock.json, Remove node_modules, and reinstall - not working
rm all the node-related files and reinstall node (v14) - not working
use nvm to run - not working
Here is the debug log I got from npm:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Users/.nvm/versions/node/v12.22.12/bin/node',
1 verbose cli '/Users/.nvm/versions/node/v12.22.12/bin/npm',
1 verbose cli 'run',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.14.16
3 info using node#v12.22.12
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle sentry_fe#1.0.0~prestart: sentry_fe#1.0.0
6 info lifecycle sentry_fe#1.0.0~start: sentry_fe#1.0.0
7 verbose lifecycle sentry_fe#1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle sentry_fe#1.0.0~start: PATH: /Users/.nvm/versions/node/v12.22.12/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/Documents/WORK/governance-sentry-fe/node_modules/.bin:/Users/.nvm/versions/node/v12.22.12/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/puppetlabs/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin
9 verbose lifecycle sentry_fe#1.0.0~start: CWD: /Users/Documents/WORK/governance-sentry-fe
10 silly lifecycle sentry_fe#1.0.0~start: Args: [ '-c', 'eden start' ]
11 silly lifecycle sentry_fe#1.0.0~start: Returned: code: 1 signal: null
12 info lifecycle sentry_fe#1.0.0~start: Failed to exec start script
13 verbose stack Error: sentry_fe#1.0.0 start: `eden start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/Users/.nvm/versions/node/v12.22.12/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (/Users/.nvm/versions/node/v12.22.12/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1022:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid sentry_fe#1.0.0
15 verbose cwd /Users/Documents/WORK/governance-sentry-fe
16 verbose Darwin 21.3.0
17 verbose argv "/Users/.nvm/versions/node/v12.22.12/bin/node" "/Users/.nvm/versions/node/v12.22.12/bin/npm" "run" "start"
18 verbose node v12.22.12
19 verbose npm v6.14.16
20 error code ELIFECYCLE
21 error errno 1
22 error sentry_fe#1.0.0 start: `eden start`
22 error Exit status 1
23 error Failed at the sentry_fe#1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Would any one imply other methods that I can use? Any responses would be appreciated.
I'm not sure if I understand your question, but I'll try my best to answer.
You can reinstall the latest version of Node.js from the official website (it should remove the old version).
This should also install npm at version 8.
To downgrade npm, you need to run the following command.
$ npm install -g npm#6.14.16
This should leave Node.js at the highest version, and npm at your desired version.
install n;
npm install -g n
or without node on mac;
brew install n
after installation execute;
n 16.15.1
if you want other versions;
n <version>
or you can install last via;
n latest
i advise for new developers;
n lts
also you can switch installed versions via
n
For more info...

Looking for possible reasons why Next.js Node Server crashes: "npm ERR! code ELIFECYCLE errno 3221225477"

This happened on node version 14.16.0. I encountered the error twice now.
The first time i created a react component with the #mui/lab/DateTimePicker.
I didn't have to install it since #mui/lab was already existing in the project. (tried to reproduce this on another branch(very few changes apart). Didn't work so probably has nothing to do with mui itself)
The second time was also the second approach to the time input component. Using another simpler node module which i had to install this time. (also couldn't reproduce this case) (worked like a charm the second time)
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from C:\develop\strapi-nextjs-poc\nextjs\.env
info - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled
event - compiled successfully in 5.7s (2008 modules)
wait - compiling /...
info - Using external babel configuration from C:\develop\strapi-nextjs-poc\nextjs\.babelrc
[styled-jsx] Loading plugin from path: C:\develop\strapi-nextjs-poc\nextjs\node_modules\#styled-jsx\plugin-sass\index.js
event - compiled successfully in 6.9s (2236 modules)
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! nextjs#0.1.0 dev: `next dev`
npm ERR! Exit status 3221225477
npm ERR!
npm ERR! Failed at the nextjs#0.1.0 dev 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\sk\AppData\Roaming\npm-cache\_logs\2022-02-17T12_52_28_233Z-debug.log
/c/Program Files/nodejs/npm: line 37: 3732 Segmentation fault "$NODE_EXE" "$NPM_CLI_JS" "$#"
Reverting the current changes sadly doesn't do anything. Even after removing all changes since the last working commit, the branch is still broken.
What i tried so far (in this order):
remove dependencies from sourcecode und package json (just removed everything since last working commit)
deleted .nextjs folder (for caching)
deleted node_modules folder
using nvm to remove the current node version and re-installing it
npm cache clean --force
npm install
After encoutering the error once, it seems to be a permanent issue on the branch (even for other people pulling). So the branch is basicly not useable anymore.
The only way i found to fix the recurrence of the error was upgrading node. Tried with v14.19.0
This just brings the problem of other possible problems with the node version in the project.
Any ideas why this is happening, what causes it or what might fix it?
full log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev'
1 verbose cli ]
2 info using npm#6.14.11
3 info using node#v14.16.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle nextjs#0.1.0~predev: nextjs#0.1.0
6 info lifecycle nextjs#0.1.0~dev: nextjs#0.1.0
7 verbose lifecycle nextjs#0.1.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle nextjs#0.1.0~dev: PATH: C:\Users\sk\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\develop\strapi-nextjs-poc\nextjs\node_modules\.bin;C:\Users\sk\bin;C:\Users\sk\AppData\Local\Programs\Git\mingw64\bin;C:\Users\sk\AppData\Local\Programs\Git\usr\local\bin;C:\Users\sk\AppData\Local\Programs\Git\usr\bin;C:\Users\sk\AppData\Local\Programs\Git\usr\bin;C:\Users\sk\AppData\Local\Programs\Git\mingw64\bin;C:\Users\sk\AppData\Local\Programs\Git\usr\bin;C:\Users\sk\bin;C:\Python39\Scripts;C:\Python39;C:\Program Files\Zulu\zulu11.35.13-ca-jdk11.0.5-win_x64\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python38\Scripts;C:\Python38;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Users\adminal\.jpm\windows\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Users\sk\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\sk\AppData\Local\Microsoft\WindowsApps;C:\Users\sk\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\sk\AppData\Local\Programs\Git\usr\bin\vendor_perl;C:\Users\sk\AppData\Local\Programs\Git\usr\bin\core_perl
9 verbose lifecycle nextjs#0.1.0~dev: CWD: C:\develop\strapi-nextjs-poc\nextjs
10 silly lifecycle nextjs#0.1.0~dev: Args: [ '/d /s /c', 'next dev' ]
11 silly lifecycle nextjs#0.1.0~dev: Returned: code: 3221225477 signal: null
12 info lifecycle nextjs#0.1.0~dev: Failed to exec dev script
13 verbose stack Error: nextjs#0.1.0 dev: `next dev`
13 verbose stack Exit status 3221225477
13 verbose stack at EventEmitter.<anonymous> (C:\Users\sk\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\sk\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid nextjs#0.1.0
15 verbose cwd C:\develop\strapi-nextjs-poc\nextjs
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v14.16.0
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 3221225477
22 error nextjs#0.1.0 dev: `next dev`
22 error Exit status 3221225477
23 error Failed at the nextjs#0.1.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225477, true ]
Based on error code - it looks like a win32 access violation error as detailed here
NodejS 14.6 is on maintenance mode - consider upgrading to 16 or 17
https://nodejs.org/en/about/releases/

Neither NPM nor GitBash are operational at the moment. How can that be solved?

I am new to GitBash and do not know how it functions within VisualStudio Code. The challenge that I am faced with is enabling React.js to operate within VSCode. As it stands, the error message below is what's being output at this time.
D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\node_modules\babel-jest (version: 27.2.4)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "babel-jest" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
6. Check if D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\node_modules\babel-jest is outside your project directory.
For example, you might have accidentally installed something in your home folder.
7. Try running npm ls babel-jest in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed babel-jest.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! affiliate-marketing-project#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the affiliate-marketing-project#0.1.0 start 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\Refined_Silver\AppData\Roaming\npm-cache\_logs\2021-10-12T16_55_33_704Z-debug.log
PS D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\affiliate-marketing-project>
I followed the instructions above, but to no avail. For starters, "babel-jest" did not exist within the dependencies section of my package.json.
Below is the message that I have been receiving, which is inside of the debug log for React within Visual Studio Code.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.14.15
3 info using node#v14.18.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle affiliate-marketing-project#0.1.0~prestart: affiliate-marketing-project#0.1.0
6 info lifecycle affiliate-marketing-project#0.1.0~start: affiliate-marketing-project#0.1.0
7 verbose lifecycle affiliate-marketing-project#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle affiliate-marketing-project#0.1.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\affiliate-marketing-project\node_modules\.bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Python39\Scripts\;C:\Python39\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\Git\cmd;C:\Ruby26-x64\bin;C:\Users\Refined_Silver\AppData\Local\Microsoft\WindowsApps;C:\Users\Refined_Silver\AppData\Local\Programs\Microsoft VS Code\bin;C:\ProgramData\Refined_Silver\GitHubDesktop\bin;C:\Users\Refined_Silver\AppData\Roaming\npm;C:\Users\Refined_Silver\AppData\Local\Yarn\bin
9 verbose lifecycle affiliate-marketing-project#0.1.0~start: CWD: D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\affiliate-marketing-project
10 silly lifecycle affiliate-marketing-project#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle affiliate-marketing-project#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle affiliate-marketing-project#0.1.0~start: Failed to exec start script
13 verbose stack Error: affiliate-marketing-project#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:400:28)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:400:28)
13 verbose stack at maybeClose (internal/child_process.js:1058:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
14 verbose pkgid affiliate-marketing-project#0.1.0
15 verbose cwd D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\affiliate-marketing-project
16 verbose Windows_NT 10.0.19043
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v14.18.0
19 verbose npm v6.14.15
20 error code ELIFECYCLE
21 error errno 1
22 error affiliate-marketing-project#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the affiliate-marketing-project#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I am not-at-all familiar with how to read what is happening within the NPM / GitBash start-up process. Everything was working fine until I installed GitBash. I would appreciate some assistance with how GitBash functions.
I would appreciate any insight as to how this can be solved. Thank you.
Have you followed step 6 and removed babel-jest in D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\node_modules ?
react-scripts comes with babel-jest. It warns you about the conflicting installation up the tree.

Node.js npm run dev throws missing module error

I'm running ubuntu on Virtual Machine on a windows computer; I have node.js and npm installed globally (node version 10.6.0; npm version 6.4.1). I cloned a React app from our internal bitbucket repo, checked out to a branch and created a new branch from that; the app is supposed to run by 'npm run dev' but when I try to run it, I get the following error:
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'braces'
When I install module 'braces', and try 'npm run dev' it gives missing module of some other module and so on. I was told by one of the developers that I need to be running npm locally and not globally (which is how I have it in my case); I tried uninstalling node.js and npm but the system won't uninstall it. Do i need to do the uninstall from root (by doing sudo -i, going to root and uninstalling)? Also, I need node.js version 10.6.0 and npm version 6.4.1 which is needed to run my other node.js/graphQL APIs - how do I make sure that I install those exact versions, after uninstalling node.js and npm from root?
Following is debug info from debug log:
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'dev'
]
2 info using npm#6.4.1
3 info using node#v10.6.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle abcms#1.0.2~predev: abcms#1.0.2
6 info lifecycle abcms#1.0.2~dev: abcms#1.0.2
7 verbose lifecycle abcms#1.0.2~dev: unsafe-perm in lifecycle true
8 verbose lifecycle abcms#1.0.2~dev: PATH:
/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-
bin:/home/usname123/Documents/DEV/uppperFolder/
abcms/node_modules/.bin:/home/rv7
94a/bin:/usr/local/bin:/usr/bin:/usr/bin/js:/home/usname123/.local/
bin:/home/usn
ame123/bin:/home/usname123/.local/bin:/var/opt/SoapUI-
5.2.1/bin:/var/opt/java/jdk1.8.0_77/bin:/usr/
local/sbin:/usr/local/bin:/usr/sbin
:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle abcms#1.0.2~dev: CWD:
/home/rv794a/Documents/DEV/upperFolder/abcms
10 silly lifecycle abcms#1.0.2~dev: Args:
[ '-c', 'webpack-dev-server --
mode development --open' ]
11 silly lifecycle abcms#1.0.2~dev: Returned: code: 1 signal: null
12 info lifecycle abcms#1.0.2~dev: Failed to exec dev script
13 verbose stack Error: abcms#1.0.2 dev: `webpack-dev-server --mode
development --open`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous>
(/usr/local/lib/node_modules/npm/node_modules/npm-
lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous>
(/usr/local/lib/node_modules/npm/node_modules/npm-
lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:961:16)
13 verbose stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:248:5)
14 verbose pkgid abcms#1.0.2
15 verbose cwd /home/usname123/Documents/DEV/upperFolder/abcms
16 verbose Linux 4.4.0-159-generic
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
18 verbose node v10.6.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error abcms#1.0.2 dev: `webpack-dev-server --mode development --open`
22 error Exit status 1
23 error Failed at the abcms#1.0.2 dev script.
23 error This is probably not a problem with npm. There is likely
additional logging output above.
24 verbose exit [ 1, true ]

ng serve fails on Angular 2 created with angular CLI on BoUoW

I am running BoUoW in elevation mode and have installed #angular/cli and created a sample project using the new command.
When i try to run the app by npm start it fails by stating the error ng serve failed, and blames it on npm and node version issues or the app itself. npm and node version are the latest ones.
Any angular 2 expert advice or am i using the wrong boilerplate app?
Edit:
#angular/cli: 1.0.0-beta.32.3
node: 6.9.5
npm: 3.10.10
Edit 2: (error logs)
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm#4.1.2
3 info using node#v7.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle testapp#0.0.0~prestart: testapp#0.0.0
6 silly lifecycle testapp#0.0.0~prestart: no script for prestart, continuing
7 info lifecycle testapp#0.0.0~start: testapp#0.0.0
8 verbose lifecycle testapp#0.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle testapp#0.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/mnt/c/Users/sande/Desktop/testapp/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
10 verbose lifecycle testapp#0.0.0~start: CWD: /mnt/c/Users/sande/Desktop/testapp
11 silly lifecycle testapp#0.0.0~start: Args: [ '-c', 'ng serve' ]
12 silly lifecycle testapp#0.0.0~start: Returned: code: 1 signal: null
13 info lifecycle testapp#0.0.0~start: Failed to exec start script
14 verbose stack Error: testapp#0.0.0 start: `ng serve`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:192:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:192:7)
14 verbose stack at maybeClose (internal/child_process.js:890:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid testapp#0.0.0
16 verbose cwd /mnt/c/Users/sande/Desktop/testapp
17 error Linux 3.4.0+
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 error node v7.5.0
20 error npm v4.1.2
21 error code ELIFECYCLE
22 error testapp#0.0.0 start: `ng serve`
22 error Exit status 1
23 error Failed at the testapp#0.0.0 start script 'ng serve'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the testapp package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error ng serve
23 error You can get information on how to open an issue for this project with:
23 error npm bugs testapp
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls testapp
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Edit 3: Steps to reproduce
Note i am using BoUoW on 14393.693 / 14.04.5 LTS
sudo n v7.5.0
npm install -g #angular/cli
ng new my-project
cd my-project
npm start
You've older version of node and npm. Current versions are:
node - v7.5.0
nam - 4.1.2
Please upgrade and try it again.
By the way, with Angular CLI, you can just ng serve. No need to use npm start.

Resources