npm start error angularjs(frontend) - javascript

$ npm start
angular-seed#0.0.0 prestart C:\wamp64\www\myapplication
npm install
npm WARN invalid config loglevel="notice"
angular-seed#0.0.0 postinstall C:\wamp64\www\myapplication
bower install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3
(node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:
Unsupported platform for fsevents#1.1.3: wanted
{"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
up to date in 78.888s
angular-seed#0.0.0 start C:\wamp64\www\myapplication
http-server -a localhost -p 8001 -c-1 ./app
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 127.0.0.1:8001
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at Server._listen2 (net.js:1262:14)
at listen (net.js:1298:10)
at net.js:1408:9
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:81:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! angular-seed#0.0.0
start: http-server -a localhost -p 8001 -c-1 ./app npm ERR! Exit
status 1 npm ERR! npm ERR! Failed at the angular-seed#0.0.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\AppData\Roaming\npm-cache_logs\2018-01-07T16_08_23_941Z-debug.log
i had this error when i run npm start frontend(angularjs)and in the symfony is run correctly can someone have a idea how can i solve.

Another process is already listening on port 8001. You are either trying to start your server twice, or there is another server/application which uses that port. The solution is to change the port or kill the process which listens on the same port.

Related

I Cant install puppeteer

I ran this script -> npm i --save-dev puppeteer to install puppeteer for e2e testing purposes.
But there is an error while installing:
C:\Users\Mora\Desktop\JS\Testing>npm i --save-dev puppeteer
> puppeteer#13.1.3 install C:\Users\Mora\Desktop\JS\Testing\node_modules\puppete
er
> node install.js
ERROR: Failed to set up Chromium r950341! Set "PUPPETEER_SKIP_DOWNLOAD" env vari
able to skip download.
Error: Download failed: server returned code 403. URL: https://storage.googleapi
s.com/chromium-browser-snapshots/Win/950341/chrome-win.zip
at C:\Users\Mora\Desktop\JS\Testing\node_modules\puppeteer\lib\cjs\puppeteer
\node\BrowserFetcher.js:367:27
at ClientRequest.requestCallback (C:\Users\Mora\Desktop\JS\Testing\node_modu
les\puppeteer\lib\cjs\puppeteer\node\BrowserFetcher.js:493:13)
at Object.onceWrapper (events.js:483:26)
at ClientRequest.emit (events.js:376:20)
at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at TLSSocket.socketOnData (_http_client.js:515:22)
at TLSSocket.emit (events.js:376:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
npm WARN js-testing-introduction#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.2 (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"
})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\wa
tchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32
"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer#13.1.3 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer#13.1.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Mora\AppData\Roaming\npm-cache\_logs\2022-02-06T10_19_25_3
69Z-debug.log
How can i fix this?
It looks like it is not able to download chromium from https://storage.googleapis.com/chromium-browser-snapshots/Win/950341/chrome-win.zip.
Check whether your network is e.g behind a proxy or storage.googleapis.com was blocked by the firewall.
// do not install a puppeteer
ran this script -> npm install --ignore-scripts puppeteer

I can't install puppeteer

I have a problem with install puppeteer.
I set Visual Code in firewall
When I write npm install puppeteer terminal show me this ERROR :
ERROR: Failed to set up Chromium r869685! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
Error: Download failed: server returned code 403. URL: https://storage.googleapis.com/chromium-browser-snapshots/Win/869685/chrome-win.zip
at D:\webs\scraper\node_modules\puppeteer\lib\cjs\puppeteer\node\BrowserFetcher.js:366:27
at ClientRequest.requestCallback (D:\webs\scraper\node_modules\puppeteer\lib\cjs\puppeteer\node\BrowserFetcher.js:492:13)
at Object.onceWrapper (events.js:483:26)
at ClientRequest.emit (events.js:376:20)
at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at TLSSocket.socketOnData (_http_client.js:515:22)
at TLSSocket.emit (events.js:376:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
npm WARN enoent ENOENT: no such file or directory, open 'D:\webs\scraper\package.json'
npm WARN scraper No description
npm WARN scraper No repository field.
npm WARN scraper No README data
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer#9.1.1 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer#9.1.1 install 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\AA\AppData\Roaming\npm-cache\_logs\2021-05-28T13_57_47_494Z-debug.log
Thanks for help.
Google is blocking you to download.
Try this :-
set environment variable PUPPETEER_DOWNLOAD_HOST to http://storage.googleapis.com

npm error while trying to install polymer

I am trying to test sensors using html and javascript like it's shown here but when I try to install polymer as it's written in the readme I get this error:
kupu#kupu:~/Dropbox/IOT/generic-sensor-demos/sensor-info$ npm install -g polymer-cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kupu/.npm/_logs/2020-05-09T17_52_32_877Z-debug.log
And even if I try to run it as sudo I get this:
kupu#kupu:~/Dropbox/IOT/generic-sensor-demos/sensor-info$ sudo npm install -g polymer-cli
/usr/local/bin/polymer -> /usr/local/lib/node_modules/polymer-cli/bin/polymer.js
> wd#1.11.2 install /usr/local/lib/node_modules/polymer-cli/node_modules/wd
> node scripts/build-browser-scripts
/usr/local/lib/node_modules/polymer-cli/node_modules/mkdirp/index.js:90
throw err0;
^
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/polymer-cli/node_modules/wd/build'
at Object.mkdirSync (fs.js:753:3)
at sync (/usr/local/lib/node_modules/polymer-cli/node_modules/mkdirp/index.js:71:13)
at Object.<anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/wd/scripts/build-browser-scripts.js:6:1)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/polymer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wd#1.11.2 install: `node scripts/build-browser-scripts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wd#1.11.2 install 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! /root/.npm/_logs/2020-05-09T17_53_02_303Z-debug.log
Is there a good soul out there that can help me?
You're having a typical npm EACCES permission issue. It has to do with your user not having permissions to modify the directory where npm is trying to store global packages. It can be very annoying. You should look here and see which solution fits you best: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
You can fix it with,
sudo npm install --unsafe-perm -g polymer-cli
Unsafe-perm flag is set to true to suppress User Identifier/ Group Identifier switching when running package scripts.The flag is explicitly set to false to prevent non-root user from installing packages.
You can also try to change ownership of node_modules,
To change ownership to current user as group -
sudo chown -R root: <YOUR_USERNAME>/usr/local/lib/node_modules/
sudo chmod -R 775 /usr/local/lib/node_modules/
And never use sudo for npm related query.

install npm socket.io failure node version < 0.10.0

Im trying to install socket.io into my beagleboneblack, system says my node -v is v0.8.22 and for installation should be at least higher than 0.10.0.
but I can`t upgrade my node.
For installing socket.io, I enter the following text:
/usr/bin/ntpdate -b -s -u pool.ntp.org
cd /var/lib/cloud9
npm install socket.io
cp bonescript-socketio/* /var/lib/cloud9
Error message:
http GET https://registry.npmjs.org/socket.io-parser/2.3.1
WARN engine object-assign#4.1.0: wanted {"node":">=0.10.0"} (current: {"node":"v0.8.22","npm":"1.2.14"})
ERR! fetch failed https://registry.npmjs.org/ms/-ms-0.7.1.tgz
Error message upon completion:
npm ERR! Error: getaddrinfo ENOTFOUND
npm ERR! at errnoException (dns.js:37:11)
npm ERR! at Object.onanswer [as oncomplete] (dns.js:124:16)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.8.13
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "socket.io"
npm ERR! cwd /var/lib/cloud9
npm ERR! node -v v0.8.22
npm ERR! npm -v 1.2.14
npm ERR! syscall getaddrinfo
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm http GET https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
npm http GET https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/lib/cloud9/npm-debug.log
npm ERR! not ok code 0
for node upgrade I've tried
opkg update
but server seems to be down..
Appreciate your attention.
If you type in:
cat /etc/dogtag
you will get a readout. This readout tells you what version of Linux you have on your machine. If you go to http://elinux.org/Beagleboard:BeagleBoneBlack_Debian, the images are updated regularly for the BBB and BBG boards.
Try to update your image and then upgrade to the newer version of socket.io.
Seth
P.S. If this does not work, please let me know.

Error in "npm start" command of angular seed cloning

I am getting the below error when i clone the angular seed from github and run the node server. I have cloned the angular seed to the existing project directory. I am not sure what is going wrong. But i am getting the below error. Kindly help
$ npm start
> StickyTodos#0.0.0 prestart C:\projects\StickyTodos
> npm install
> StickyTodos#0.0.0 postinstall C:\projects\StickyTodos
> bower install
> StickyTodos#0.0.0 start C:\projects\StickyTodos
> http-server -a localhost -p 8000 -c-1
events.js:141
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 127.0.0.1:8000
at Object.exports._errnoException (util.js:860:11)
at exports._exceptionWithHostPort (util.js:883:20)
at Server._listen2 (net.js:1234:14)
at listen (net.js:1270:10)
at net.js:1379:9
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:63:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:82:10)
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v5.0.0
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! StickyTodos#0.0.0 start: `http-server -a localhost -p 8000 -c-1`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the StickyTodos#0.0.0 start script 'http-server -a localhost -p 8000 -c-1'.
npm ERR! This is most likely a problem with the StickyTodos package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! http-server -a localhost -p 8000 -c-1
npm ERR! You can get their info via:
npm ERR! npm owner ls StickyTodos
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\projects\StickyTodos\npm-debug.log
The error Error: listen EADDRINUSE 127.0.0.1:8000 is explaining that something is already bound to port 8000.
As you are on Windows, running netstat -a -b in an elevated command prompt (Right click start button and press Command Prompt (Admin)) should show you what is already listening to port 8000.
Simply stop that process, or alternatively bind to a different port which is free.

Categories

Resources