Issue Installing Polymer on Arch Linux via npm - npm

I get the following error when installing Polymer CLI as follows
sudo npm install -g polymer-cli
29577 info lifecycle wd#1.5.0~install: wd#1.5.0
29578 verbose lifecycle wd#1.5.0~install: unsafe-perm in lifecycle false
29579 verbose lifecycle wd#1.5.0~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/lib/node_modules/polymer-cli/node_modules/wd/node_modules/.bin:/usr/lib/node_modules/polymer-cli/node_modules/.bin:/usr/lib/node_modules/.bin:/usr/local/sbin:/usr/loc\
al/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
29580 verbose lifecycle wd#1.5.0~install: CWD: /usr/lib/node_modules/polymer-cli/node_modules/wd
29581 silly lifecycle wd#1.5.0~install: Args: [ '-c', 'node scripts/build-browser-scripts' ]
29582 silly lifecycle wd#1.5.0~install: Returned: code: 1 signal: null
29583 info lifecycle wd#1.5.0~install: Failed to exec install script
29584 verbose unlock done using /root/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
29585 verbose stack Error: wd#1.5.0 install: `node scripts/build-browser-scripts`
29585 verbose stack Exit status 1
29585 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
29585 verbose stack at EventEmitter.emit (events.js:160:13)
29585 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
29585 verbose stack at ChildProcess.emit (events.js:160:13)
29585 verbose stack at maybeClose (internal/child_process.js:943:16)
29585 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
29586 verbose pkgid wd#1.5.0
Any idea how to fix it?
UPDATE
I updated the npm and bower to the latest versions and then ran the install command again for polymer-cli. Now I get the following error message - it's a permissioning problem when running the script. I am not sure if this is down to the npm install script or if it is an arch linux problem.
sudo npm install -g polymer-cli
npm WARN deprecated babel-preset-es2015#6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated bower#1.8.2: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN deprecated github#7.3.2: 'github' has been renamed to '#octokit/rest' (https://git.io/vNB11)
npm WARN deprecated #types/assert#0.0.29: See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/12826
/usr/bin/polymer -> /usr/lib/node_modules/polymer-cli/bin/polymer.js
> uws#0.14.5 install /usr/lib/node_modules/polymer-cli/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0
sh: build_log.txt: Permission denied
> wd#1.5.0 install /usr/lib/node_modules/polymer-cli/node_modules/wd
> node scripts/build-browser-scripts
/usr/lib/node_modules/polymer-cli/node_modules/mkdirp/index.js:90
throw err0;
^
Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/polymer-cli/node_modules/wd/build'
at Object.fs.mkdirSync (fs.js:905:18)
at sync (/usr/lib/node_modules/polymer-cli/node_modules/mkdirp/index.js:71:13)
at Object.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/wd/scripts/build-browser-scripts.js:6:1)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:193:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wd#1.5.0 install: `node scripts/build-browser-scripts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wd#1.5.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! /root/.npm/_logs/2018-01-28T19_51_38_197Z-debug.log
The issue now is when the script tries to make this directory:
mkdir '/usr/lib/node_modules/polymer-cli/node_modules/wd/build'

use --unsafe-perm option to install polymer-cli globally as described here
sudo npm install -g polymer-cli --unsafe-perm
or Change npm's Default Directory
and then install npm install -g polymer-cli without sudo and --unsafe-perm option.

Switched to Yarn and it installs!
sudo yarn global add polymer-cli
yarn global v1.3.2
[1/4] Resolving packages...
warning polymer-cli > babel-preset-es2015#6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
warning polymer-cli > bower#1.8.2: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
warning polymer-cli > github#7.3.2: 'github' has been renamed to '#octokit/rest' (https://git.io/vNB11)
warning polymer-cli > polyserve > #types/assert#0.0.29: See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/12826
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "polymer-cli#1.5.7" with binaries:
- polymer
Done in 61.35s.

Related

How can I fix NPM which always says unexpected token =

After my machine updated automatically, NPM is not working any more
OS: Ubuntu 20.04.3 LTS
npm -v: 8.1.4
node -v: v10.19.0
Every time I try to start something with NPM, it gives me the same error message:
*#*:~$ npm help
npm WARN npm npm does not support Node.js v10.19.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! Unexpected token =
npm ERR! A complete log of this run can be found in:
npm ERR! /home/*/.npm/_logs/2021-11-19T13_44_25_087Z-debug.log
The Error log contains the following:
0 verbose stack /usr/local/lib/node_modules/npm/lib/commands/help.js:16
30 verbose stack static description = 'Get help on npm'
30 verbose stack ^
30 verbose stack
30 verbose stack SyntaxError: Unexpected token =
30 verbose stack at Module._compile (internal/modules/cjs/loader.js:723:23)
30 verbose stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
30 verbose stack at Module.load (internal/modules/cjs/loader.js:653:32)
30 verbose stack at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
30 verbose stack at Function.Module._load (internal/modules/cjs/loader.js:585:3)
30 verbose stack at Module.require (internal/modules/cjs/loader.js:692:17)
30 verbose stack at require (internal/modules/cjs/helpers.js:25:18)
30 verbose stack at Npm.cmd (/usr/local/lib/node_modules/npm/lib/npm.js:97:18)
31 verbose cwd /home/*
32 verbose Linux 5.11.0-40-generic
33 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "help"
34 verbose node v10.19.0
35 verbose npm v8.1.4
36 error Unexpected token =
37 verbose exit 1
I solved it like this:
Install nvm
sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
nvm install node
Source
Upgrade your node version, you're using the newest npm version, and it doesn't support old versions of node
Since you're on ubuntu i recommend you to use nvm
sudo apt-get install nvm
nvm install 16
nvm use 16
npm is broken because it will ignore PATH, and it will ignore the calling runtime, instead it will use an arbitrary runtime.
sudo which node
/usr/local/bin/node
.
sudo /usr/local/bin/node --version
v17.1.0
.
sudo /usr/local/bin/node /usr/local/bin/npm install -g node#latest
...
npm ERR! npm WARN npm npm does not support Node.js v10.19.0
...
removing the distribution version might be a workaround.

Socket timeout when trying to create a new vue project with vue-cli

I'm getting an error when I create a new Vue project using vue-cli. Each time the create fails on a "Socket timeout" but a different request? I updated node using nvm and installed the latest vue-cli.
Terminal shows this:
Vue CLI v4.5.9
✨ Creating project in /Users/me/Documents/GitHub/myproject.
🗃 Initializing git repository...
⚙️ Installing CLI plugins. This might take a while...
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! request to https://registry.npm.taobao.org/cosmiconfig failed, reason: Socket timeout
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/me/.npm/_logs/2020-12-07T11_02_37_391Z-debug.log
ERROR command failed: npm install --loglevel error --legacy-peer-deps
The create tends to fail around the log file is around line 4900. These are the last lines in the log file:
4875 timing idealTree:node_modules/webpack-dev-server/node_modules/anymatch/node_modules/normalize-path Completed in 0ms
4876 timing idealTree:buildDeps Completed in 164233ms
4877 timing idealTree:fixDepFlags Completed in 10ms
4878 timing idealTree Completed in 164265ms
4879 timing command:install Completed in 164269ms
4880 verbose type system
4881 verbose stack FetchError: request to https://registry.npm.taobao.org/cosmiconfig failed, reason: Socket timeout
4881 verbose stack at ClientRequest.<anonymous> (/Users/me/.nvm/versions/node/v15.3.0/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:97:14)
4881 verbose stack at ClientRequest.emit (node:events:376:20)
4881 verbose stack at TLSSocket.socketErrorListener (node:_http_client:490:9)
4881 verbose stack at TLSSocket.emit (node:events:388:22)
4881 verbose stack at emitErrorNT (node:internal/streams/destroy:188:8)
4881 verbose stack at emitErrorCloseNT (node:internal/streams/destroy:153:3)
4881 verbose stack at processTicksAndRejections (node:internal/process/task_queues:80:21)
4882 verbose cwd /Users/me/Documents/GitHub/myproject
4883 verbose Darwin 19.6.0
4884 verbose argv "/Users/me/.nvm/versions/node/v15.3.0/bin/node" "/Users/me/.nvm/versions/node/v15.3.0/bin/npm" "install" "--loglevel" "error" "--legacy-peer-deps"
4885 verbose node v15.3.0
4886 verbose npm v7.0.14
4887 error code ERR_SOCKET_TIMEOUT
4888 error errno ERR_SOCKET_TIMEOUT
4889 error request to https://registry.npm.taobao.org/cosmiconfig failed, reason: Socket timeout
4890 verbose exit 1
I ran into this as well. Fixed it by first running
vue config -e
Then setting this property to false:
{
"useTaobaoRegistry": false
}
Ok, I just updated my os to Big Sur and now it seems to work.
Updating to Big Sur did not help me.
This, however, helped:
sudo npm uninstall -g vue
sudo npm uninstall -g vue-cli
sudo npm uninstall -g #vue/cli
sudo npm cache clean --force
sudo npm install -g vue
sudo npm install -g #vue/cli

pkcs11js#1.0.19 script failure installing Hyperledger Caliper CLI from NPM v0.2.0

I am trying to install Hyperledger Caliper CLI from npm.
However, can't bind the sut, fabric SDK with caliper. It shows the following -
2020.01.12-19:29:43.747 info [caliper] [bind] Calling npm with: install grpc#1.14.2 fabric-ca-client#1.4.4 fabric-client#1.4.4 fabric-protos#2.0.0-snapshot.1 fabric-network#1.4.4
npm WARN deprecated hoek#4.2.1: 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 (hapi.im/commercial).
> pkcs11js#1.0.19 install /home/necos/caliper/caliper-benchmarks/node_modules/pkcs11js
> node-gyp rebuild
gyp WARN EACCES current user ("necos") does not have permission to access the dev dir "/root/.cache/node-gyp/8.10.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/necos/caliper/caliper-benchmarks/node_modules/pkcs11js/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/necos/caliper/caliper-benchmarks/node_modules/pkcs11js/.node-gyp'
gyp ERR! System Linux 4.15.0-74-generic
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/necos/caliper/caliper-benchmarks/node_modules/pkcs11js
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN notsup Unsupported engine for fabric-protos#2.0.0-snapshot.1: wanted: {"node":"^8.9.0","npm":"^5.5.1"} (current: {"node":"8.10.0","npm":"6.13.6"})
npm WARN notsup Not compatible with your version of node/npm: fabric-protos#2.0.0-snapshot.1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pkcs11js#1.0.19 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.19 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-01-12T22_30_01_834Z-debug.log
2020.01.12-19:30:01.898 error [caliper] [bind] Failed to execute "npm" with return code 1.
Error: Failed to execute "npm" with return code 1.
at ChildProcess.proc.on (/home/necos/caliper/caliper-benchmarks/node_modules/#hyperledger/caliper-cli/lib/utils/cmdutils.js:56:35)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
Command failed
I tried node-gyp rebuild, but seems of no use.
Anybody can clarify what's happening here?
Installation environment:
Ubuntu bionic on the server,
NodeJS v8.10
node-gyp v6.1.0
node-pre-gyp v0.14.0
Docker v19.03.1
Docker-compose v0.19.20
This is the root of the problem:
gyp WARN EACCES current user ("necos") does not have permission to access the dev dir "/root/.cache/node-gyp/8.10.0
The Caliper install guide contains workarounds for this problem:
https://hyperledger.github.io/caliper/vLatest/installing-caliper/#installing-from-npm
The above is inspired by the official NPM guide for the same problem:
https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally

Gatsby new fails to install the sharp package and breaks

I can't initiate a gatsby starter project. The new command process breaks down during initialization, and results in an error and non-compilable project.
Here's the command:
> gatsby new gatsby-test
The follwing process starts, failing when during npm install when the sharp package is attempting to install.
info Creating new site from git:
Cloning into 'gatsby-test'...
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 2309 (delta 4), reused 10 (delta 4), pack-reused 2299
Receiving objects: 100% (2309/2309), 12.62 MiB | 7.98 MiB/s, done.
Resolving deltas: 100% (1487/1487), done.
success Created starter directory layout
info Installing packages...
> sharp#0.23.2 install /home/developer/projects/gatsby-test/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-x64.tar.gz
fs.js:114
throw err;
^
Error: EACCES: permission denied, copyfile '/tmp/1890-libvips-8.8.1-linux-x64.tar.gz' -> '/home/developer/.npm/_libvips/libvips-8.8.1-linux-x64.tar.gz'
at Object.copyFileSync (fs.js:1728:3)
at WriteStream.<anonymous> (/home/developer/projects/gatsby-test/node_modules/sharp/install/libvips.js:104:16)
at WriteStream.emit (events.js:198:13)
at lazyFs.close (internal/fs/streams.js:207:14)
at FSReqWrap.args [as oncomplete] (fs.js:140:20)
make: Entering directory '/home/developer/projects/gatsby-test/node_modules/sharp/build'
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
In file included from ../src/common.cc:25:0:
/usr/include/vips/vips8:35:10: fatal error: glib-object.h: No such file or directory
#include <glib-object.h>
^~~~~~~~~~~~~~~
compilation terminated.
sharp.target.mk:129: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: *** [Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory '/home/developer/projects/gatsby-test/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.15.0-70-generic
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/developer/projects/gatsby-test/node_modules/sharp
gyp ERR! node -v v10.17.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (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 WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp#0.23.2 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp#0.23.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! /home/developer/.npm/_logs/2019-11-18T16_45_16_026Z-debug.log
ERROR
Command failed with exit code 1: npm install
Error: Command failed with exit code 1: npm install
- error.js:56 makeError
[lib]/[gatsby-cli]/[execa]/lib/error.js:56:11
- index.js:114 handlePromise
[lib]/[gatsby-cli]/[execa]/index.js:114:26
- next_tick.js:68 process._tickCallback
internal/process/next_tick.js:68:7
Any idea what's going on here? I saw there were some problems with sharp in the past but that is supposed to be a closed and fixed issue now. What am I missing here?
You can fix this by running the below in your terminal...
rm -rf /Users/{username}/.npm/_libvips
brew install vips
rm -rf node_modules
npm install
The following line:
Error: EACCES: permission denied, copyfile '/tmp/1890-libvips-8.8.1-linux-x64.tar.gz' -> '/home/developer/.npm/_libvips/libvips-8.8.1-linux-x64.tar.gz'
suggests you have a permissions error moving tmp file to your users local .npm directory. Hard to tell why this is without knowing more context about which user ran the command, etc.
The following line:
fatal error: glib-object.h: No such file or directory
suggests you don't have sharp or vips correctly installed.
npm install sharp
For Ubuntu:
sudo apt-get install -y libvips-tools
For mac:
brew update vips
For archlinux/manjaro:
sudo pacman -S libvips
I had the same issue. I solved it by downloading the package manually and pasting in
download the libvips from https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-x64.tar.gz
copy the lib into .npm folder
sudo cp libvips-8.8.1-linux-x64.tar.gz /home/[YOURNAME]/.npm/_libvips/
remove your broken gatsby-test folder
run
gatsby new gatsby-test
again
To fix this, I ran:
rm -rf node_modules
yarn cache clean
yarn add --dev yarn-upgrade-all
npx yarn-upgrade-all
Then, I re-installed all necessary packages removed from package.json when I ran the command to upgrade all packages.
Afterwards, I ran gatsby build and gatsby develop
Try the sudo command. If you're happy with applying root perms to the install.

Error on NPM install - Phantomjs#1.9.18

Getting this every time I try to install mean.io application have tried
npm cache clean,
tried total reinstall ,
going mad at the moment . Am also running this as administrator. pleas help
C:\Users\mmcelhinney\pitch_v1>npm install
-
> phantomjs#1.9.18 install C:\Users\mmcelhinney\pitch_v1\node_modules\phantomjs
> node install.js
Download already available at C:\Users\MMCELH~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip
Extracting zip contents
Removing C:\Users\mmcelhinney\pitch_v1\node_modules\phantomjs\lib\phantom
Copying extracted folder C:\Users\MMCELH~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1456238458670\phantomjs-1.9.8-windows -> C:\Users\mmcelhinney\pitch_v1\node_modules\phantom
s\lib\phantom
Phantom installation failed { [Error: EPERM, unlink 'C:\Users\MMCELH~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1456238458670\phantomjs-1.9.8-windows\phantomjs.exe']
errno: -4048,
code: 'EPERM',
path: 'C:\\Users\\MMCELH~1\\AppData\\Local\\Temp\\phantomjs\\phantomjs-1.9.8-windows.zip-extract-1456238458670\\phantomjs-1.9.8-windows\\phantomjs.exe' } Error: EPERM, unlink 'C:\Users\MMCELH~1\App
ata\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1456238458670\phantomjs-1.9.8-windows\phantomjs.exe'
at Error (native)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! phantomjs#1.9.18 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs#1.9.18 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs package,
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 their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! error rolling back Error: EPERM, unlink 'C:\Users\mmcelhinney\pitch_v1\node_modules\phantomjs\lib\phantom\phantomjs.exe'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EPERM, unlink 'C:\Users\mmcelhinney\pitch_v1\node_modules\phantomjs\lib\phantom\phantomjs.exe']
npm ERR! error rolling back errno: -4048,
npm ERR! error rolling back code: 'EPERM',
npm ERR! error rolling back path: 'C:\\Users\\mmcelhinney\\pitch_v1\\node_modules\\phantomjs\\lib\\phantom\\phantomjs.exe' }
Excerpt from Debug log as well :
6379 info phantomjs#1.9.18 Failed to exec install script
6380 verbose unlock done using C:\Users\mmcelhinney\AppData\Roaming\npm-cache_locks\phantomjs-69c2bf63828d859c.lock for C:\Users\mmcelhinney\pitch_v1\node_modules\phantomjs
6381 verbose stack Error: phantomjs#1.9.18 install: node install.js
6381 verbose stack Exit status 1
6381 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
6381 verbose stack at EventEmitter.emit (events.js:110:17)
6381 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:14:12)
6381 verbose stack at ChildProcess.emit (events.js:110:17)
6381 verbose stack at maybeClose (child_process.js:1008:16)
6381 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
Try my solution here https://stackoverflow.com/a/35043377/5734480
It may be slightly different depending on your OS.