Git Product home page Git Product logo

Comments (9)

millun avatar millun commented on May 19, 2024

Ran into the same problem. not quite sure how to cope with the js issue. mine goes like this:

.../frontend$ ../gradlew start
.............
.............

ERROR in ./src/config/router.js
Module not found: Error: Cannot resolve module 'isDev' in .../frontend/src/config
@ ./src/config/router.js 57:13-29

ERROR in ./src/config/store.js
Module not found: Error: Cannot resolve module 'isDev' in .../frontend/src/config
@ ./src/config/store.js 23:13-29

any hints appreciated. cheers

from boot-react.

geowarin avatar geowarin commented on May 19, 2024

Hey guys! Thanks for the feedback.

isDev is a node module, it should be installed in frontend/node_modules.
If you have npm installed, could you please use npm start in the frontend directory instead of relying on the webpack profile?
Also, what OS are you using?

I updated the node version used in the gradle node plugin but forgot to update it here:

public static final NODE_VERSION = '4.1.1'

It should say 5.0.0.

To be honest, the WebpackLauncher is a bit fragile. I should probably remove it and promote the use of npm instead.

from boot-react.

geowarin avatar geowarin commented on May 19, 2024

Another thing is you have to run gradle frontend:npmInstall or go in the frontend dir and type npm install before trying to run the frontend.

from boot-react.

geowarin avatar geowarin commented on May 19, 2024

Last word in favor of running npm start instead of using the webpack profile:
the output of the two processes will be cleanly separated. It is easier to see errors that way.
You can also restart one without touching the other, which is a big plus IMHO but I'd love to hear your thoughts and suggestions.

from boot-react.

geowarin avatar geowarin commented on May 19, 2024

And finally @geakstr, properties you pass to gradle are not passed over to spring so -Dspring.profiles.active will not work this way.

See spring-projects/spring-boot#832 and http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html

from boot-react.

millun avatar millun commented on May 19, 2024

Hi! thanks for the response. Maybe I wasn't too specific.
I did try npm install too altogether with npm start but I ran into this exception
app.use('/api', (req, res) => {
^^
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
figure I might be using old nodejs? will try to upgrade... and let you know then.

I love the idea of your seed project btw!

from boot-react.

geowarin avatar geowarin commented on May 19, 2024

@millun Yes! The arrow notation for functions is for node 4.0.0+.

Guys, I pushed a new branch where the problem is fixed:
https://github.com/geowarin/boot-react/blob/210fb2f39cf0e393e82a267a85a34facd79a4795/backend/src/main/groovy/react/config/webpack/WebpackLauncher.groovy
but I find the code difficult to understand...

from boot-react.

nullsumme avatar nullsumme commented on May 19, 2024

Just some comment about this problem:

ERROR in ./src/config/router.js
Module not found: Error: Cannot resolve module 'isDev' in .../frontend/src/config
@ ./src/config/router.js 57:13-29

I'm not sure if this is a platform (I'm on Ubuntu) problem but i had to rename the module import:

import isDev from 'isDev';

to

import isDev from 'isdev';

from boot-react.

geowarin avatar geowarin commented on May 19, 2024

@nullsumme You're totally right, that's a bug. I'll fix this ASAP.

from boot-react.

Related Issues (20)

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.