Code Monkey home page Code Monkey logo

spring-cloud-contract-nodejs's People

Contributors

bradtraversy avatar marcingrzejszczak avatar maxim-mazurok avatar russoalberto avatar spring-operator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spring-cloud-contract-nodejs's Issues

Error running `npm test`

Attempting to run the Spring Cloud Contract example tests I cloned the repo and ran the npm test as described in the README.md. I got the following error ERROR: JAVA_HOME is set to an invalid directory: /root/.sdkman/candidates/java/current/.

Originally I assumed this was an issue with my local install of SDKMAN, but learning the Spring supported docker images also use SDKMAN - I found the directory being called out in the error above matches the Dockerfile's line 19: https://github.com/spring-cloud/spring-cloud-contract/blob/bbb4db35838f62c8e6df7479e64a33bd875f765d/docker/spring-cloud-contract-stub-runner-docker/Dockerfile#L19

I'm running this on a Mac in iTerm2 and from the terminal within IntelliJ with the same results. Here is my terminal output to try and provide additional context:

$ npm -v                                                                                           
6.14.11

$ node -v                                                                                          
v10.24.0

$ java --version                                                                                   
openjdk 11.0.10 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)

$ echo $SDKMAN_DIR                                                                                 
/Users/[my_home]/.sdkman

$ echo $JAVA_HOME
/Users/[my_home]/.sdkman/candidates/java/current

$ npm test                                                                                         

> [email protected] test /Users/[my_home]/git/github/spring-cloud-samples/spring-cloud-contract-nodejs
> ./run_tests.sh



Running tests against Artifactory


~/git/github/spring-cloud-samples/spring-cloud-contract-nodejs/docker ~/git/github/spring-cloud-samples/spring-cloud-contract-nodejs
Killing docker_artifactory_1 ... done
Killing docker_mongo_1       ... done
~/git/github/spring-cloud-samples/spring-cloud-contract-nodejs
Fetching submodules
Submodule path 'spring-cloud-contract-nodejs-external-contracts': checked out '01c1a8a9f0ba4804a907642f48a26a9e3195c1f2'
Entering 'spring-cloud-contract-nodejs-external-contracts'
From https://github.com/spring-cloud-samples/spring-cloud-contract-nodejs-external-contracts
 * branch            master     -> FETCH_HEAD
Successfully rebased and updated detached HEAD.
Building docker
~/git/github/spring-cloud-samples/spring-cloud-contract-nodejs/docker ~/git/github/spring-cloud-samples/spring-cloud-contract-nodejs
Going to remove docker_artifactory_1, docker_mongo_1
Removing docker_artifactory_1 ... done
Removing docker_mongo_1       ... done
mongo uses an image, skipping
Building artifactory
Step 1/4 : FROM docker.bintray.io/jfrog/artifactory-oss:5.5.1
 ---> add606aca80a
Step 2/4 : MAINTAINER Marcin Grzejszczak <[email protected]>
 ---> Using cache
 ---> f0bb37404ef7
Step 3/4 : COPY artifactory.config.import.yml /var/opt/jfrog/artifactory/etc/artifactory.config.import.yml
 ---> Using cache
 ---> bc69e380670a
Step 4/4 : ENTRYPOINT ["/bin/sh", "-c", "/entrypoint-artifactory.sh"]
 ---> Using cache
 ---> e56f266e24a4

Successfully built e56f266e24a4
Successfully tagged docker_artifactory:latest
Creating docker_mongo_1       ... done
Creating docker_artifactory_1 ... done
~/git/github/spring-cloud-samples/spring-cloud-contract-nodejs
Waiting for 30 seconds for artifactory to boot properly
Working around certificate issues
up to date in 4.965s
[!] 215 vulnerabilities found [1263 packages audited]
    Severity: 89 Low | 14 Moderate | 112 High
    Run `npm audit` for more detail

+ [email protected]
updated 1 package in 6.156s
[!] 215 vulnerabilities found [1263 packages audited]
    Severity: 89 Low | 14 Moderate | 112 High
    Run `npm audit` for more detail

appending output to nohup.out
Sc Contract Version [3.0.2-SNAPSHOT]
Application URL [http://host.docker.internal:9876]
Artifactory URL [http://host.docker.internal:8081/artifactory/libs-release-local]
Project Version [0.0.1.RELEASE]
Setting project name to [bookstore]
Running the build

ERROR: JAVA_HOME is set to an invalid directory: /root/.sdkman/candidates/java/current/

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

npm ERR! Test failed.  See above for more details.

Thoughts?

Model.find() no longer accepts a callback in Mongoose

Got [Model.find() no longer accepts a callback in Mongoose](https://stackoverflow.com/questions/75655652/model-find-no-longer-accepts-a-callback-in-mongoose) error when running node app

Fixed by doing npm install mongoose@4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.