Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to install phantomjs-launcher on Windows #923

Closed
craigpalermo opened this issue Oct 12, 2016 · 15 comments
Closed

Error when trying to install phantomjs-launcher on Windows #923

craigpalermo opened this issue Oct 12, 2016 · 15 comments

Comments

@craigpalermo
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
I get the following error when trying to install phantomjs-prebuilt. The same thing happens using the past few versions of this package. Is this something that needs to be fixed by the package author in order to make it compatible with Yarn?

$ yarn add phantomjs-prebuilt@2.1.10
yarn add v0.15.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error C:\Users\cpalermo\node_modules\phantomjs-prebuilt: UNKNOWN: unknown error, open 'C:\Users\cpalermo\AppData\Local\Yarn\npm-phantomjs-prebuilt-2.1.10\lib\phantom\bin\phantomjs.exe'
    at Error (native)
info Visit http://yarnpkg.com/en/docs/cli/add for documentation about this command.

If the current behavior is a bug, please provide the steps to reproduce.
Run yarn add phantomjs-prebuilt, with or without --save/--dev/etc.

What is the expected behavior?
Install package without error

Please mention your node.js, yarn and operating system version.
Node v6.7.0
Yarn v0.15.1
Windows 7

@arcticShadow
Copy link

I've also noticed similar strange things on Mac when installing the 'phantomjs' package. Typically running the same command again has resolved it for me. Havn't looked any further with this particular issue yet.

@craigpalermo
Copy link
Author

@arcticShadow I've also tried running the command multiple times, but it seems to just clear Yarn's cached version of the package and start from scratch (probably because the previous installation failed, so the yarn.lock file isn't updated).

@hailwood
Copy link

I'm also noting some strange errors with phantomjs but it seems to work fine with npm install

yarn install
yarn install v0.15.1
info No lockfile found.
warning BootStripe@2.0.1: Dependency "path" listed in "devDependencies" is the name of a built-in module
[1/4] Resolving packages...
warning gulp-minify-css@1.2.4: Please use gulp-clean-css
warning gulp > vinyl-fs > glob-stream > minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
warning browser-sync > localtunnel > request > tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
warning gulp-imagemin > imagemin-optipng > exec-buffer > execa > cross-spawn-async@2.2.4: cross-spawn no longer requires a build toolchain, use it instead!
[2/4] Fetching packages...
warning fsevents@1.0.14: The platform "linux" is incompatible with this module.
info "fsevents@1.0.14" is an optional dependency and failed compatibility check. Excluding it from installation.
warning benchmark@1.0.0: The engine "rhino" appears to be invalid.
warning lodash@1.0.2: The engine "rhino" appears to be invalid.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/5] ⠈ gifsicle
[2/5] ⠈ jpegtran-bin
[3/5] ⠈ optipng-bin
[-/5] ⠈ waiting...
error /home/matthew/Projects/site/httpdocs/themes/default/node_modules/phantomjs: Command failed.
Exit code: 1
Command: sh
Arguments: -c node install.js
Directory: /home/matthew/Projects/site/httpdocs/themes/default/node_modules/phantomjs
Output:
Considering PhantomJS found at /usr/bin/phantomjs
Found PhantomJS at /usr/bin/phantomjs ...verifying
PhantomJS detected, but wrong version 2.1.1 @ /usr/bin/phantomjs.
Phantom installation failed TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:1211:7)
    at findSuitableTempDirectory (/home/matthew/Projects/site/httpdocs/themes/default/node_modules/phantomjs/install.js:127:30)
    at /home/matthew/Projects/site/httpdocs/themes/default/node_modules/phantomjs/install.js:476:19
    at nextTickCallback (/home/matthew/Projects/site/httpdocs/themes/default/node_modules/kew/kew.js:47:28)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9) TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:1211:7)
    at findSuitableTempDirectory (/home/matthew/Projects/site/httpdocs/themes/default/node_modules/phantomjs/install.js:127:30)
    at /home/matthew/Projects/site/httpdocs/themes/default/node_modules/phantomjs/install.js:476:19
    at nextTickCallback (/home/matthew/Projects/site/httpdocs/themes/default/node_modules/kew/kew.js:47:28)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at SpawnError (/opt/nodejs/lib/node_modules/yarn/lib/errors.js:18:1)
    at ChildProcess.proc.on.code (/opt/nodejs/lib/node_modules/yarn/lib/util/child.js:107:15)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:850:16)
    at Socket.<anonymous> (internal/child_process.js:323:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:492:12)
info Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command.

@frenic
Copy link

frenic commented Oct 13, 2016

I also get the same unknown error as @unscsprt on one environment, but it works fine on another. Both are running on Node 5.3.0 and Yarn 0.15.1.

@frenic
Copy link

frenic commented Oct 14, 2016

Another interesting detail is wasn't until I updated phantomjs-prebuilt@2.1.12 to phantomjs-prebuilt@2.1.13 it started working on one of my environments. With phantomjs-prebuilt@2.1.12 both failed. When I compare those versions it's basically just a dependency update, es6-promise@~3.2.1 to es6-promise@~4.0.3.

@comfroels
Copy link

Interesting @faddee ... I'm going to try using that version in my project and see what happens

@comfroels
Copy link

Yup phantomjs-prebuilt@2.1.13 definitely works in my Win 10 environment and my vagrant environment (Ubuntu).

@enoshixi
Copy link
Contributor

Same issue here, Windows 7. phantomjs-prebuilt@2.1.13 does NOT work for me.

$ yarn
yarn install v0.15.1
info No lockfile found.
error npm-shrinkwrap.json found. This will not be updated or respected. See [TODO] for more information.
[1/4] Resolving packages...
warning tslint > findup-sync > glob > minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[2/4] Fetching packages...
warning fsevents@1.0.14: The platform "win32" is incompatible with this module.
info "fsevents@1.0.14" is an optional dependency and failed compatibility check. Excluding it from installation.
warning benchmark@1.0.0: The engine "rhino" appears to be invalid.
[3/4] Linking dependencies...
warning Unmet peer dependency "babel-core@^6.0.0".
[4/4] Building fresh packages...
[1/1] ⠠ phantomjs-prebuilt: Cached build artifact lib
[-/1] ⠠ waiting...
[-/1] ⠠ waiting...
[-/1] ⠠ waiting...
error C:\Project\node_modules\phantomjs-prebuilt: UNKNOWN: unknown error, open 'C:\Users\enoshixi\AppData\Local\Yarn\npm-phantomjs-prebuilt-2.1.13\lib\phantom\bin\phantomjs.exe'
    at Error (native)
info Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command.

@busches
Copy link
Contributor

busches commented Oct 19, 2016

Version 0.16.0 comes with numerous bug fixes and the command is working on Windows 7 for myself. Can anyone else who experienced an issue previously retry with 0.16.+?

@enoshixi
Copy link
Contributor

I am still getting the exact same error using yarn 0.16.1.

@frenic
Copy link

frenic commented Oct 19, 2016

I ran into a new error with yarn@v0.16.0 so I can't really tell for now.

@frenic
Copy link

frenic commented Oct 21, 2016

Working now with yarn@0.16.1

@joshkel
Copy link
Contributor

joshkel commented Oct 28, 2016

@hailwood's issue looks like #1538.

@frenic
Copy link

frenic commented Nov 4, 2016

@joshkel I'm having this issue again and the TMPDIR workaround didn't help.

@joshkel
Copy link
Contributor

joshkel commented Nov 4, 2016

@faddee I think @hailwood's issue (with the TMPDIR workaround) is different than the problems that others are describing in this issue. I haven't seen the "unknown error" messages myself, so I could be wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants