Open ianseverance opened 6 years ago
@ScriptedAlchemy Do you have any advice? 😃
update or downgrade to @latest on all faceyspacey products
how old is your config?
i had that error too i fixed it with downgrade "react-universal-component@5.0.0-alpha.0" to to "react-universal-component@4.0.0-alpha.0"
wich seems caused by https://github.com/faceyspacey/react-universal-component/commit/8c930fa549d4046b03bce8e496e357f84030bc64
dont use the alphas anymore, everything has been officially released-i decided against 4.0 and instead brought out a stable set of releases in v3
react 16 api will the the next major release
good to know thanks! @ScriptedAlchemy
I have updated all faceyspacey modules but it is still not working (they were already @latest)
dep
"react-universal-component": "^3.0.3",
"redux-first-router": "^0.0.16-next",
"redux-first-router-link": "^1.4.2",
"webpack-flush-chunks": "^2.0.3"
dev
"babel-plugin-universal-import": "^3.1.2"
Could it have anything to do with using Babel 7? I was trying to upgrade everything at once and was hoping for the best 😆 @ScriptedAlchemy
The file is there, just not being added into the dynamic chunks...
faceyspacey/react-universal-component@8c930fa The removal of the babel plugin check to replace the '-' with '/' is exactly the problem though, isn't it? Which is why in my logs it can't find pages-Home
because it is pages/Home
? @ScriptedAlchemy
wait, yeah your build is getting nested, it shouldnt be doing that.
One of those deps is not updating its self, can you try killing your yarn lock and node modules fresh install
Inside RUC you can also add ignoreBabelRename: true
search it on the RUC readme
Pretty much, im keeping the dashes instead of slashes, to resolve it in flush chunks is not worth the hassle.
When I start with a fresh yarn.lock
and a fresh node modules install, the build is still nested (Home.js
file under pages/
) and the file doesn't appear in my HTML under the dyanmic chunks.
When I add the option ignoreBabelRename: true
the file does appear in my HTML under dynamic chunks.
But now I am having a problem with Webpack making another package (specifically redux-responsive) not work. Could Webpack's new optimization settings be too aggressive to the point where some javascript isn't making it into the build files?
I just debugged all my packages (updated them all 1-by-1) and the only time my site stops working (the redux-responsive module, which has nothing to do with Webpack) is when it comes to updating the faceyspacey modules and Webpack to v4. @ScriptedAlchemy
Sadly, for things like this, theres so many variables.
Ive seen this issue show up before, it must be something related to babel configurations?
without seeing the whole project, i cant determine the issue. if things are updated, and configured properly - it works
might be your autodll plugin
Here is my .babelrc
:
{
"presets": [
"@babel/preset-env",
"@babel/preset-flow",
"@babel/preset-react"
],
"plugins": [
["@babel/plugin-proposal-decorators", {
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-syntax-dynamic-import",
["module-resolver", {
"alias": {
"server": "./server",
"src": "./src",
"assets": "./src/assets",
"components": "./src/components",
"containers": "./src/containers",
"pages": "./src/pages",
"state": "./src/state",
"actions": "./src/state/actions",
"reducers": "./src/state/reducers",
"styles": "./src/styles",
"templates": "./src/templates",
"themes": "./src/themes",
"utils": "./src/utils",
"tools": "./tools",
"wp": "./tools/webpack"
}
}],
"universal-import"
],
"env": {
"development": {
"plugins": [
"react-hot-loader/babel"
]
}
}
}
There are discrepancies between the faceyspacey modules on how to setup everything together, e.g. webpack optimization settings, which may be causing my problem (too many settings that I tossed together). Is there any word on an updated demo of all the faceyspacey modules?
Do you compile your server code?
Yes, a buildServer
folder is created when I run the server.
you got a repo for me?
also check this:
https://github.com/faceyspacey/redux-first-router/issues/305
I'm receiving this error after updating to Webpack 4 and updated the Universal modules:
[FLUSH CHUNKS]: Unable to find pages-Home in Webpack chunks. Please check usage of Babel plugin.
My page no longer loads the page specific
.js
file. (Used to load<script type="text/javascript" src="/page/Home.js" defer="defer"></script>
)This is what shows up in my HTML now:
The page successfully loads, but it is without javascript. What have I done wrong?
client.dev.js
server.dev.js