-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Bug. Yarn couldn't build package phantomjs. npm could. #1016
Comments
I think i opened a similar issue: #1015 |
It is not exactly duplicate. They fixed it in stringstream, but it still does not work in PhantomJS. I would reopen it. |
@igorshubovych did you try phantomjs-prebuilt instead (which is the latest version of phantomjs)? I wonder if the old phantomjs package was itself buggy, but npm happened to work with it. |
Updating phantomjs-prebuilt to |
I can reproduce the issue. When I run
With Why was this issue closed? |
I'm having the same issue here. |
Having the issue.
PhantomJS not found on PATH |
@ilaif I don't have the ability to re-open it, but I'll mention @cpojer who does. I still recommend using phantomjs-prebuilt instead (which is the latest version of phantomjs). With so many open issues, I could understand if the Yarn project chooses not to allocate resources fixing compatibility with an old, buggy package when yarn already works with the newer, recommended version of the package. |
seeing this in [email protected] also |
@markstos this is not an issue with the old package only. I can reproduce this with yarn 0.20.3 and phantomjs-prebuilt 2.1.14. However, this is only reproducible under Linux. On Windows 7 under Cygwin it works fine. @cpojer please consider reopening this as it clearly isn't resolved. A lot of build environments depend on phantomjs for testing etc, so this is a major blocker for using Yarn in them. |
@csvan Could you post the output of your failure to build |
@markstos Good day. There is no more problem with yarn and package phantomjs-prebuilt. I installed it successfully just now. Thanks to all
|
@markstos getting this on CentOS 7 when running
|
@csvan Your failure is in "findSuitableTempDirectory". You apparently don't have permission to write to several possible temp directories on your system. See: https://github.com/Medium/phantomjs/blob/master/install.js#L105 That appears to be your problem, not yarns. Try again after setting your own environment variable to a working value: I used |
@markstos great catch, I will try that. Does NPM do this by default? The above project builds fine with NPM 3.10, it only fails under Yarn. |
This toolset works for me
"karma-phantomjs-launcher": "^1.0.2",
"phantomjs-prebuilt": "2.1.8", |
It looks like this has been fixed in (If you're finding this bug because you're using |
The package phantomjs is actually just an older version of phantomjs-prebuilt. This older version has a bug which makes it crash when trying to install with yarn. See: yarnpkg/yarn#1016 (comment) In fact, since karma-phantomjs-launcher already installs phantomjs-prebuilt (and we don't actually use PhantomJS other than through that module), we don't also need to depend on it at all.
The package phantomjs is actually just an older version of phantomjs-prebuilt. This older version has a bug which makes it crash when trying to install with yarn. See: yarnpkg/yarn#1016 (comment) In fact, since karma-phantomjs-launcher already installs phantomjs-prebuilt (and we don't actually use PhantomJS other than through that module), we don't also need to depend on it at all.
The package phantomjs is actually just an older version of phantomjs-prebuilt. This older version has a bug which makes it crash when trying to install with yarn. See: yarnpkg/yarn#1016 (comment) In fact, since karma-phantomjs-launcher already installs phantomjs-prebuilt (and we don't actually use PhantomJS other than through that module), we don't also need to depend on it at all.
The package phantomjs is actually just an older version of phantomjs-prebuilt. This older version has a bug which makes it crash when trying to install with yarn. See: yarnpkg/yarn#1016 (comment) In fact, since karma-phantomjs-launcher already installs phantomjs-prebuilt (and we don't actually use PhantomJS other than through that module), we don't also need to depend on it at all.
If you switch over to |
For anyone still having this issue, I recommend switching over to Chrome Headless. It does everything phantom does better, and is actively supported across all platforms. |
@mikestead How does that work? Do I have to remove the launcher? |
The same problem |
@xahon maybe you can try #1538 (comment)? |
The package phantomjs is actually just an older version of phantomjs-prebuilt. This older version has a bug which makes it crash when trying to install with yarn. See: yarnpkg/yarn#1016 (comment) In fact, since karma-phantomjs-launcher already installs phantomjs-prebuilt (and we don't actually use PhantomJS other than through that module), we don't also need to depend on it at all.
I had the same problem,try |
same problem |
@dapi you should provide the version of |
What @markstos said except also replace phantomjs with phantomjs-prebuilt in package.json. |
I had the same issue, it works installing [email protected] |
This works for me:
|
Adding phantomjs-prebuilt to the global packages fixed it for me.
|
I tried to build this project Github, npm installed all node_modules without errors. But when I tried to do this with Yarn I have got error.
os Archliux 64bit
node v6.7.0
yarn v0.15.1
Building fresh packages... [1/6] ⠁ gifsicle [2/6] ⠁ jpegtran-bin [3/6] ⠁ optipng-bin [6/6] ⠁ phantomjs error /usr/share/nginx/html/123/Travel-Site-Test/node_modules/phantomjs: Command failed. Exit code: 1 Command: sh Arguments: -c node install.js Directory: /usr/share/nginx/html/123/Travel-Site-Test/node_modules/phantomjs Output: PhantomJS not found on PATH Phantom installation failed TypeError: Path must be a string. Received undefined at assertPath (path.js:7:11) at Object.join (path.js:1213:7) at findSuitableTempDirectory (/usr/share/nginx/html/123/Travel-Site-Test/node_modules/phantomjs/install.js:127:30) at /usr/share/nginx/html/123/Travel-Site-Test/node_modules/phantomjs/install.js:476:19 at nextTickCallback (/usr/share/nginx/html/123/Travel-Site-Test/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:1213:7) at findSuitableTempDirectory (/usr/share/nginx/html/123/Travel-Site-Test/node_modules/phantomjs/install.js:127:30) at /usr/share/nginx/html/123/Travel-Site-Test/node_modules/phantomjs/install.js:476:19 at nextTickCallback (/usr/share/nginx/html/123/Travel-Site-Test/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 (/usr/lib/node_modules/yarn/lib/errors.js:18:1) at ChildProcess.proc.on.code (/usr/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:877:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
The text was updated successfully, but these errors were encountered: