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

npm install does not run on Windows (mvn clean install fails dependent) #1

Closed
jonashackt opened this issue Sep 21, 2017 · 9 comments
Closed

Comments

@jonashackt
Copy link
Owner

You could use <npmVersion>5.0.4</npmVersion>, then it should work. npm > 5.0.4 has problems on Windows

@florianrusch
Copy link

These people, which are using Windows, could serve the issue by using docker 😅 Or by switching the os to Linux or macOS.

@jonashackt
Copy link
Owner Author

Yeah, nice idea. Native Docker on Windows makes sense :) But I always like the idea to have something working right from inside the IDE - so a downgrade is maybe more straightforward...

@jogaco
Copy link

jogaco commented Nov 27, 2017

It is not always possible to choose Linux: company policies.
In my case, it does not run even after changing npmVersion to 5.0.4

INFO] removed 7 packages and updated 1184 packages in 129.894s
[ERROR]
[INFO]
[INFO] --- frontend-maven-plugin:1.5:npm (npm run build) @ frontend ---
[INFO] Running 'npm run build' in C:\Home\Projects\test\spring-boot-vuejs\frontend
[INFO]
[INFO] > frontend@1.0.0 build C:\Home\Projects\test\spring-boot-vuejs\frontend
[INFO] > node build/build.js
[INFO]
[ERROR] C:\Home\Projects\test\spring-boot-vuejs\frontend\build\webpack.prod.conf.js:81
[ERROR]     new webpack.optimize.ModuleConcatenationPlugin(),
[ERROR]     ^
[ERROR]
[ERROR] TypeError: webpack.optimize.ModuleConcatenationPlugin is not a constructor
[ERROR]     at Object.<anonymous> (C:\Home\Projects\test\spring-boot-vuejs\frontend\build\webpack.prod.conf.js:81:5)
[ERROR]     at Module._compile (module.js:570:32)
[ERROR]     at Object.Module._extensions..js (module.js:579:10)
[ERROR]     at Module.load (module.js:487:32)
[ERROR]     at tryModuleLoad (module.js:446:12)
[ERROR]     at Function.Module._load (module.js:438:3)
[ERROR]     at Module.require (module.js:497:17)
[ERROR]     at require (internal/module.js:20:19)
[ERROR]     at Object.<anonymous> (C:\Home\Projects\test\spring-boot-vuejs\frontend\build\build.js:12:23)
[ERROR]     at Module._compile (module.js:570:32)
[ERROR]     at Object.Module._extensions..js (module.js:579:10)
[ERROR]     at Module.load (module.js:487:32)
[ERROR]     at tryModuleLoad (module.js:446:12)
[ERROR]     at Function.Module._load (module.js:438:3)
[ERROR]     at Module.runMain (module.js:604:10)
[ERROR]     at run (bootstrap_node.js:389:7)
[ERROR]     at startup (bootstrap_node.js:149:9)
[ERROR]     at bootstrap_node.js:502:3

@jonashackt
Copy link
Owner Author

@jogaco looks like another type of error! the initial was, that npm install failed - yours is different, I think, a google search might help ;)

@jogaco
Copy link

jogaco commented Nov 29, 2017

@jonashackt Thanks but I overlooked the issue. After lots of try outs, I got it working. Too many new things to digest for a backend dev.
I upgraded client's pom node and npm versions to v8.9.1 and 5.5.1.
I also run manually at the console npm i webpack --save-dev

With these I succeeded with mvn clean install

@jogaco
Copy link

jogaco commented Nov 30, 2017

Only problem is frontend does not get response from backend.
If I click on callservice, I get Backend response: []

@jogaco
Copy link

jogaco commented Nov 30, 2017

This worked for me: (Had to add created function and watch field)

  // import axios from 'axios'
  import {AXIOS} from './http-common'

  export default {
    name: 'service',

    data () {
      return {
        msg: 'HowTo call REST-Services:',
        response: [],
        errors: []
      }
    },

    created () {
      this.callRestService()
    },

    watch: {
      '$route': 'callRestService'
    },

    methods: {
      // Fetches posts when the component is created.
      callRestService () {
        AXIOS.get(`api/hello`)
          .then(response => {
            // JSON responses are automatically parsed.
            this.response = response.data
            console.log(response.data)
          })
          .catch(e => {
            this.errors.push(e)
          })
      }
    }
  }

@jonashackt
Copy link
Owner Author

Thanks for the awesome feedback! Glad, that you finally got it running :) I close this issue for now, hope this is ok!?!

@jogaco
Copy link

jogaco commented Dec 6, 2017

Absolutely. Thanks for your example App.

jonashackt pushed a commit that referenced this issue Oct 25, 2019
…ssary-annotations

Remove use of unnecessary annotations
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