Comments (11)
so the problem was in webpack.config.babel in windows, match.script is not matching the npm script name, so I replaced the function with process.env.npm_lifecycle_event === "web:dev" and got passed the error, but then I got
C:\Users\rickm\Documents\Google Drive\Projects\NodeJS\rfx-stack\src\shared\app.js:34
var uri = ['http://', config.io.host, ':', config.io.port].join('');
^
TypeError: Cannot read property 'io' of undefined
and got tired of debugging :)
EDIT: ookaayyy gave it another shot and there was indeed cross OS env shenanigans going on so I installed cross-env and change package.json to "web:dev": "cross-env NODE_ENV=development node ./run/start.web.js"
and it worked (I'm on win 10), cheers
from rfx-stack.
I didn't used the stack on a window machine. However I don't know if this issue it's related to the OS.
But certainly is related to the webpack-dev-middleware package, and it's similar to these issues:
I think you should ask there.
But first, you can try to edit the output.path
of /webpack/config.client.dev.js
:
from:
output: {
path: '/',
...
to:
output: {
path: path.join(Dir.public, 'build'),
...
If path.join()
don't work either, try with path.resolve()
.
let me know if this worked.
from rfx-stack.
Thanks @foxhound87, I tried that, but it did not help. I tried also to put a line like
export function config() {
console.log(path.join(Dir.public, 'build'));
and I see no output. It is like it's breaking somewhere before it hits that line. But I run launched an Ubuntu VM will try there.
from rfx-stack.
The webpack config file is loaded from the hot-middleware in /src/web/middleware/hot.js
using babel-root-import
:
import config from '~/webpack.config.babel';
so I think ther's something still not working on the babel-root-import
with the Windows-Filesystem support:
https://github.com/michaelzoidl/babel-root-import/issues?utf8=%E2%9C%93&q=window
I suggest to remove the package and replace all the imports from '~/
with the relative real path.
...or try one of these packages instead:
- https://www.npmjs.com/package/babel-root-import-fragment
- https://www.npmjs.com/package/babel-import-from-root
- https://www.npmjs.com/package/babel-plugin-root-import
from rfx-stack.
@dariuspranskus let me know if you fixed it
from rfx-stack.
@dariuspranskus this issue can be caused also by the node env vars, consider using this for cross platform support: https://www.npmjs.com/package/cross-env
from rfx-stack.
I have the same issue on Windows 10. And I also tried the cross-env, still not working.
from rfx-stack.
@FerminYang Thank you for your hint.
from rfx-stack.
@rickmed please, can you test the last commit on windows? I made some changes, still using the match.script() but I changed the implementation. That's a very strange behavior.
from rfx-stack.
@foxhound87 it works
from rfx-stack.
@rickmed thank you for your support! issue closed! 4c139ea
from rfx-stack.
Related Issues (20)
- Deploying to Heroku HOT 3
- npm run seed:dev - Seeding Error. HOT 3
- mobx-react-form "constructor.name" is mangled by uglify. [use --keep-fnames] HOT 4
- Eslinter on Windows throws absurd errors HOT 1
- Improve debugging in development mode? HOT 3
- Maybe remove deprecated webpack DedupePlugin HOT 1
- Better name for container component HOT 1
- Strange initial redraw for routes with System.import in Chrome HOT 5
- Authenticated routes HOT 4
- Error running "npm run web:dev" on ubuntu 16.04 Node 6.9.2 npm 3.10.9 HOT 1
- map is not a function HOT 2
- async import state HOT 13
- Current Build broken : ESLint Errors and Unhandled Promise Rejections HOT 3
- [Question] Use of UUID in Models/Services HOT 2
- npm run api:prod cannot find module /api/services/post/config.js HOT 3
- A newbie's question HOT 2
- how to hot reload mobx store
- Migrating to router v4. HOT 1
- Migrating to router v4 from v3 HOT 3
- Disabling SSR? HOT 7
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 rfx-stack.