PolymerCLI - Error : Run the command "npm install -g polymer-cli-1.5.7.tgz" - npm

Following the steps:
install polymer-cli
Run the command : npm install polymer-cli
After install the bundled-debs :
Run the command : npm install -g bundle-deps
After run the command :
bundle-deps
Finally run the command :
npm pack
Got the polymer-cli-1.5.7.tgz file.
Now, run the npm install command,
npm install -g polymer-cli-1.5.7.tgz
Result :
Get the error message :
```
C:\Users\*****\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\polymer-cli\node_modules\chokidar\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":"ia32"})
npm WARN sinon-chai#2.14.0 requires a peer of chai#>=1.9.2 <5 but none was installed.
npm WARN sinon-chai#2.14.0 requires a peer of sinon#^1.4.0 || ^2.1.0 || ^3.0.0 || ^4.0.0 but none was installed.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "polymer-cli-1.5.7.tgz"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! path C:\Users\*****\AppData\Roaming\npm\node_modules\.staging\#polymer\sinonjs-1e1235f0
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\*****\AppData\Roaming\npm\node_modules\.staging\#polymer\sinonjs-1e1235f0' -> 'C:\Users\*****\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\#polymer\sinonjs'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\*****\AppData\Roaming\npm\node_modules\.staging\#polymer\sinonjs-1e1235f0' -> 'C:\Users\*****\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\#polymer\sinonjs'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\nginx-1.13.7\html\polymer-cli\npm-debug.log
npm ERR! code 1
```
Note:
****** - User Name
Versions & Environment
- Polymer CLI: 1.5.7
- node: v.6.11.5
- Operating System: windows

I am not sure why are you installing polymer-cli-1.5.7.tgz when you installed polymer-cli already in the first step? But not globally, you are missing -g switch in first step. What are you trying to achieve, which procedure do you follow? The issue could be related to permissions because you don't have rights to access that path, but you could try running console with administrator privileges. It is better to explain what exactly you want to setup so we can give you a better answer :)

Related

GoCD - npm install failing

I am trying to set up a pipeline using GoCD. I have a requirement of running npm install and npm test, and so, I created a Pipeline with a single Stage, that has a single Job with two tasks.
When I execute the pipeline, the npm install task seems to fail with the error mentioned below. However, when I manually run npm install from the repository in the agent's folder, it goes through without errors. With GoCD's npm install, I found that almost all packages except 2 seem to be installed. It fails with the follow error, and I suspect this to be some problem with node-gyp.
...
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules/glob-watcher/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 install: `node install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn sh ENOENT
npm ERR! file sh
npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh
npm ERR! node-expat#2.4.0 install: `node-gyp rebuild`
npm ERR! spawn sh ENOENT
npm ERR!
npm ERR! Failed at the node-expat#2.4.0 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:
...
I tried using Jenkins and found the same issue. After a lot of deep dives, I found that it had something to do with the Python version being used, which in turn is due to the Node version being used. I was using Node v12.4.0, and upgrading it to Node v14.x.x addressed my issue.

unable to run npm start or npm install in Ubuntu 18.04

I'm new to front-end development and nodejs / react so please bear with me if this is a silly question.
I was trying to learn by using this open project: https://github.com/ilhammeidi/boss-lite
In the readme, it states pretty clearly on how to deploy this react project:
Clone this project
Install module dependencies by run this script in terminal npm install
After finish downloading, then run the app. npm run dev
Navigate to http://localhost:8080
However I cannot get even the first npm install step right on my Ubuntu 18.04:
john#home:~/learnFE/code/boss-lite$ npm install
npm WARN deprecated material-ui-pickers#1.0.1: You can now upgrade to #material-ui/pickers. Documentation for v2 can be found at https://material-ui-pickers-v2.dmtr-kovalenko.now.sh/
npm WARN deprecated axios#0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated react-router-redux#5.0.0-alpha.9: This project is no longer maintained.
npm ERR! Linux 5.4.0-67-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/john/learnFE/code/boss-lite/npm-debug.log
john#home:~/learnFE/code/boss-lite$
I searched the error and found this post in which this is a widely accepted solution: run sudo npm install -g npm#latest, however:
john#home:~/learnFE/code/boss-lite$ sudo npm install -g npm#latest
▌ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine npm#7.9.0: wanted: {"node":">=10"} (current: {"node":"8.10.0","npm":"3.5.2"})
/usr/local/lib
└── (empty)
npm ERR! Linux 5.4.0-67-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "npm#latest"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib/node_modules/.staging/#npmcli/ci-detect-c7bf9552
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/#npmcli/ci-detect-c7bf9552' -> '/usr/local/lib/node_modules/npm/node_modules/#npmcli/ci-detect'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/#npmcli/ci-detect-c7bf9552' -> '/usr/local/lib/node_modules/npm/node_modules/#npmcli/ci-detect'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/john/learnFE/code/boss-lite/npm-debug.log
npm ERR! code 1
john#home:~/learnFE/code/boss-lite$
It says This is most likely not a problem with npm itself. How to proceed then?
The linux kernel version also appears:
npm ERR! Linux 5.4.0-67-generic
I'm clueless right now and it is so frustrating to be failing at the simple and basic step...
Maybe it is because the github project itself is flawed? I guess not.
Probably this is some really basic stuff. Any help?
These errors were simply due to the packages being obsolete for your OS.
Just update them by running,
npm update --force
This will install the latest versions of these packages. This will take a while depending on your internet connection.
Then run npm start and it works.

npm error installing serialport

I'm trying to use node.js serialport package but it give some errors that I don't understand.
To simplify, I start form a clear directory 'test' and I create a new app:
sudo npm init
Then I try to install serialport:
sudo npm install serialport --save
but I've got this error:
serialport#5.0.0 install /*********/test/node_modules/serialport
node-pre-gyp install --fallback-to-build
env: node: No such file or directory
npm WARN test#1.0.0 No description
npm WARN test#1.0.0 No repository field.
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! serialport#5.0.0 install: node-pre-gyp install --fallback-to-build
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the serialport#5.0.0 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! /Users/myUser/.npm/_logs/2017-09-17T20_33_23_435Z-debug.log
I've tryed with other versions, clear npm cache, and other strange things, but I don't get any solution.
Versions:
OSX 10.8.5
node -v: v8.4.0
Thanks!
Ok.
I've resolved it with this order to install:
sudo npm install serialport --unsafe-perm --build-from-source
as the serialport web page says:
https://www.npmjs.com/package/serialport
Thanks for all!

error command failed to execute ... npm install

I followed http://www.phoenixframework.org/docs/installation to install Phoenix on a current Debian system but can't get it to work. When I want to create a new Phoenix application I get the following error:
abc#xyz:~$ mix phoenix.new test10
* creating test10/config/config.exs
[...]
* creating test10/web/views/page_view.ex
Fetch and install dependencies? [Yn] Y
* running npm install && node node_modules/brunch/bin/brunch build
* error command failed to execute, please run the following command
again after installation:
"npm install && node node_modules/brunch/bin/brunch build"
[...]
If I then run the npm install I get this:
abc#xyz:~/test10$ npm install
npm ERR! addLocal Could not install /home/abc/test10/deps/phoenix
npm ERR! addLocal Could not install /home/abc/test10/deps/phoenix_html
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/home/abc/.npm-global/bin/npm" "install"
npm ERR! node v6.5.0
npm ERR! npm v3.10.6
npm ERR! path /home/abc/test10/deps/phoenix
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory,
open '/home/abc/test10/deps/phoenix'
npm ERR! enoent ENOENT: no such file or directory,
open '/home/abc/test10/deps/phoenix'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/abc/test10/npm-debug.log
abc#xyz:~/test10$
What do I have to do to fix this?
Running mix deps.get did the trick:
abc#xyz:~/test10$ mix deps.get
Could not find Hex, which is needed to build dependency :phoenix
Shall I install Hex? (if running non-interactively, use: "mix local.hex --force") [Yn] Y
* creating /home/abc/.mix/archives/hex-0.13.0
Running dependency resolution
Dependency resolution completed
connection: 1.0.4
[...]

ElectronJs: Not able to install "install.js:22 throw err"

I am starting with Electron js and I have stumbled on the very first step which is installed Electron.
I am running the following command to install electron provided at
source
npm install electron-prebuilt --save-dev
Following is the result of the command
C:\Users\vikas\Desktop\electron apps\example>npm install electron-prebuilt --sa
ve-dev
electron-prebuilt#0.37.8 postinstall C:\Users\vikas\Desktop\electron apps\exa
mple\node_modules\electron-prebuilt
node install.js
C:\Users\vikas\Desktop\electron apps\example\node_modules\electron-prebuilt\ins
tall.js:22
throw err
^
Error: end of central directory record signature not found
at C:\Users\vikas\Desktop\electron apps\example\node_modules\yauzl\index.js
:167:14
at C:\Users\vikas\Desktop\electron apps\example\node_modules\yauzl\index.js
:473:5
at C:\Users\vikas\Desktop\electron apps\example\node_modules\fd-slicer\inde
x.js:32:7
at FSReqWrap.wrapper as oncomplete
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\vikas\Desktop
\electron apps\example\package.json'
npm WARN example No description
npm WARN example No repository field.
npm WARN example No README data
npm WARN example No license field.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\vikas\AppData\
\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "electron-prebuilt"
"--save-dev"
npm ERR! node v4.4.3
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! electron-prebuilt#0.37.8 postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-prebuilt#0.37.8 postinstall script 'node install
.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-prebuilt pac
kage,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-prebuilt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\vikas\Desktop\electron apps\example\npm-debug.log
Windows 8.1
NPM Version 3.8.9
Does C:\Users\vikas\Desktop\electron apps\example\package.json exist? If not try running npm init to create it, and then run npm install electron-prebuilt --save-dev again.
this is bug and a workaround is provided on github : Source
Here is the workaround:
rm -rf ~/.electron/
rm -rf ~/.atom/
npm cache clear
npm install
I was facing a similar issue. But opening the command prompt as administrator (Windows) and reinstalling electron fixed the issue.