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

Cannot install PhantomJS via yarn for the first time #2485

Closed
ThaKing opened this issue Jan 18, 2017 · 3 comments
Closed

Cannot install PhantomJS via yarn for the first time #2485

ThaKing opened this issue Jan 18, 2017 · 3 comments

Comments

@ThaKing
Copy link

ThaKing commented Jan 18, 2017

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

bug
What is the current behavior?

[INFO] --- frontend-maven-plugin:1.3:install-node-and-yarn (install node and yarn) @ web ---
[INFO] Node v5.10.1 is already installed.
[INFO] Yarn 0.19.1 is already installed.
[INFO] 
[INFO] --- frontend-maven-plugin:1.3:yarn (yarn install) @ web ---
[INFO] Running 'yarn install' in /home/user/project/web
[INFO] yarn install v0.19.1
[INFO] [1/4] Resolving packages...
[INFO] [2/4] Fetching packages...
[WARNING] warning fsevents@1.0.17: The platform "linux" is incompatible with this module.
[INFO] info "fsevents@1.0.17" is an optional dependency and failed compatibility check. Excluding it from installation.
[INFO] [3/4] Linking dependencies...
[INFO] [4/4] Building fresh packages...
[ERROR] error /home/user/project/web/node_modules/phantomjs: Command failed.
[ERROR] Exit code: 1
[ERROR] Command: sh
[ERROR] Arguments: -c node install.js
[ERROR] Directory: /home/user/project/web/node_modules/phantomjs
[ERROR] Output:
[ERROR] PhantomJS not found on PATH
[INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[ERROR] Phantom installation failed [TypeError: Path must be a string. Received undefined] TypeError: Path must be a string. Received undefined
[ERROR]     at assertPath (path.js:7:11)
[ERROR]     at Object.join (path.js:1213:7)
[ERROR]     at findSuitableTempDirectory (/home/user/project/web/node_modules/phantomjs/install.js:127:30)
[ERROR]     at /home/user/project/web/node_modules/phantomjs/install.js:476:19
[ERROR]     at nextTickCallback (/home/user/project/web/node_modules/kew/kew.js:47:28)
[ERROR]     at _combinedTickCallback (internal/process/next_tick.js:67:7)
[ERROR]     at process._tickCallback (internal/process/next_tick.js:98:9)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

If the current behavior is a bug, please provide the steps to reproduce.

Using maven 3.2.5
pom.xml

 <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <!-- 1. Install node and npm locally -->
                    <execution>
                        <id>install node and yarn</id>
                        <goals>
                            <goal>install-node-and-yarn</goal>
                        </goals>
                        <configuration>
                            <nodeVersion>v5.10.1</nodeVersion>
                            <yarnVersion>v0.19.1</yarnVersion>
                        </configuration>
                    </execution>

                    <!-- 2. Install yarn -->
                    <execution>
                        <id>yarn install</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>install</arguments>
                        </configuration>
                    </execution>
  </executions>

package.json

{
  "name": "web",
  "version": "0.0.0",
  "description": "configuration to handle yarn requirements",
  "private": true,
  "devDependencies": {
    "grunt": "~0.4.5",
    "grunt-contrib-less": "1.2.0",
    "grunt-contrib-watch": "0.6.1",
    "grunt-protractor-runner": "~1.2.1",
    "grunt-karma": "~0.11.2",
    "grunt-cli": "~0.1.13",
    "grunt-bowercopy": "1.2.4",
    "grunt-contrib-uglify":"",
    "grunt-contrib-clean":"",
    "grunt-contrib-copy":"",
    "karma": "~0.12.0",
    "karma-jasmine": "~0.2.2",
    "karma-coverage": "~0.5.1",
    "karma-phantomjs-launcher": "~0.1.4",
    "karma-chrome-launcher": "~0.1.7",
    "karma-junit-reporter": "~0.3.4",
    "jasmine-reporters": "<2.0.0",
    "karma-sonarqube-unit-reporter": "0.0.2",
    "bower-nexus3-resolver" : "*",
    "bower": "~1.7.7",
    "phantomjs-prebuilt": "2.1.12",
    "mocha": "~2.3.1",
    "karma-ng-html2js-preprocessor": "0.2.0",
    "eslint": "",
    "eslint-plugin-angular": "",
    "eslint-config-angular": "",
    "eslint-plugin-jasmine": "",
    "gruntify-eslint":"",
    "grunt-ng-annotate-analyze":"0.2.3"
  }
}

What is the expected behavior?
When I ran second time - everything OK, and with NPM - OK(even after removing node_module dir). When node_module is removed the previous error appeared

[INFO] --- frontend-maven-plugin:1.3:install-node-and-yarn (install node and yarn) @ web ---
[INFO] Node v5.10.1 is already installed.
[INFO] Yarn 0.19.1 is already installed.
[INFO] 
[INFO] --- frontend-maven-plugin:1.3:yarn (yarn install) @ web ---
[INFO] Running 'yarn install' in /home/user/project/web
[INFO] yarn install v0.19.1
[INFO] [1/4] Resolving packages...
[INFO] [2/4] Fetching packages...
[WARNING] warning fsevents@1.0.17: The platform "linux" is incompatible with this module.
[INFO] info "fsevents@1.0.17" is an optional dependency and failed compatibility check. Excluding it from installation.
[INFO] [3/4] Linking dependencies...
[INFO] [4/4] Building fresh packages...
[INFO] success Saved lockfile.
[INFO] Done in 9.55s.

Please mention your node.js, yarn and operating system version.
Node v5.10.1
Yarn v0.19.1
Maven 3.2.5
Ubuntu 16.04.1
Kernel 4.4.0-59-lowlatency

@ThaKing
Copy link
Author

ThaKing commented Apr 13, 2017

Could anybody tell when this issue will (not) be fixed ? Thank you

@dcecile
Copy link

dcecile commented May 4, 2017

This looks like a duplicate of #1016 -- both seem to be about phantomjs-prebuilt failing due to npm_config_tmp not set 🤔

@rally25rs
Copy link
Contributor

Unable to reproduce on Yarn v0.24.6. I think this issue has been fixed.

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

3 participants