Giter VIP home page Giter VIP logo

react-and-spring's People

Contributors

antonrud avatar fasuke85 avatar oven avatar sgrevling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-and-spring's Issues

Fails to npm install the frontend in Windows with CreateProcess error

Issue

Tried running "mvn clean install" on the cloned project in my windows machine. Node and npm were installed. Execution with goal "npm" and argument "install" fails to execute with the below error.

Error Logs:

[INFO] Installed npm locally.
[INFO]
[INFO] --- frontend-maven-plugin:1.6:npm (npm install) @ spring-and-react ---
[INFO] Running 'npm install' in C:\Users\username\Desktop\react-and-spring-master\frontend
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.853 s
[INFO] Finished at: 2019-01-18T00:54:04+05:30
[INFO] Final Memory: 23M/389M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (npm install) on project spring-and-react: Failed to run task: 'npm install' failed. java.io.IOException: Cannot run program "C:\Users\username\Desktop\react-and-spring-master\target\node\node.exe" (in directory "C:\Users\username\Desktop\react-and-spring-master\frontend"): CreateProcess error=193, %1 is not a valid Win32 application -> [Help 1]

Possible Reasons:

  1. The frontend-maven-plugin is using CreateProcess instead of ShellExecute
  2. The frontend-maven-plugin is installing 64bit npm and node but execution command is for 32bit application

proxy setting in package.json

Error : When specified, "proxy" in package.json must be a string.
Instead, the type of "proxy" was "object".
Either remove "proxy" from package.json, or make it a string

changing the proxy settings as below worked:
"proxy": "http://localhost:8080/api"

Is it fine to proceed as above?

Need to map url paths to index.html when using React Router

Spring Boot will take control of the url mapping so anything not specifically defined in a controller will be mapped to the /error path. You need to manually specify the paths used by react-router in a controller and map them all to /index.html.
Here's an example:

@Controller
public class SPAController {

  @RequestMapping(value = {"/",  "/profile/**"})
  public String index() {
    return "/index.html";
  }
}

routing?

Everything works after i finished the steps mentioned in this page.
However I want to add routing to the page and that doesn't work. Anyone has an idea how to solve it?

mvn is not recognized

'mvn' is not recognized as an internal or external command,
operable program or batch file.
when trying to mvn clean install ??

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.