Comments (9)
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.
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:
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.
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.
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.
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.
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.
@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.
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.
@nullsumme You're totally right, that's a bug. I'll fix this ASAP.
from boot-react.
Related Issues (20)
- Add support to server rendering HOT 2
- CSRF is disabled, any plans to enabled this? HOT 2
- Full Node/React UI Server + Spring Boot REST API HOT 3
- Missing resources resolution HOT 6
- session in redis not work HOT 1
- Cannot find module "../../../assets/stylus/main.styl HOT 3
- Run on server(tomcat) return white empty page. HOT 5
- Error in ./src/index.js on npm run
- Cannot find module babel-core HOT 2
- ./gradlew frontend:yarnInstall is not correct
- Error after run ./gradlew bootRun - Caused by: java.io.IOException: Cannot run program "yarn" (in directory "frontend") HOT 3
- Failed to apply plugin [class 'io.spring.gradle.dependencymanagement.DependencyManagementPlugin'] HOT 2
- Poll: switch to create-react-app HOT 1
- Latest YarnRunner fails on Windows HOT 3
- Serving proper 404s from the backend for non-existing pages HOT 2
- how to support OAuth2
- Axios interceptor doesn't catch timeout error HOT 1
- How to set favicon? HOT 1
- java.io.IOException: Cannot run program "yarn" (in directory "../frontend"): error=2 HOT 3
- Logout isn't working correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boot-react.