_webpackIsomorphicTools2.default.assets is not a function and missing path with webpack-isomorphic-tools.assets()
See original GitHub issueI’m having a bit of trouble getting my SSR working with webpack-isomorphic-tools, so far I’ve got my build script spitting out the relevant static files and the webpack-assets.json, but on loading the server and trying to pull in the CSS using WebpackIsomorphicTools.assets()
I get an error:
TypeError: _webpackIsomorphicTools2.default.assets is not a function
at web-app/src/server/server.js:35:40
and when trying to use global.webpack_isomorphic_tools.assets()
I get the error:
AssertionError: missing path
at Module.require (module.js:466:3)
at require (internal/module.js:20:19)
at webpack_isomorphic_tools.assets (web-app/node_modules/webpack-isomorphic-tools/source/index.js:100:10)
at web-app/src/server/server.js:35:49
node 6.3.1 npm 3.10.6 babel-core 6.10.4
https://gist.github.com/ChazUK/d3d0f53d2ee1cad8cc1929a6796d4f07
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
[webpack-isomorphic-tools] [error] asset not found #106 - GitHub
Using a default one . [webpack-isomorphic-tools/plugin] [debug] No path parser specified for "fonts" assets. Using a defaul t one.
Read more >Integrating with webpack-isomorphic-tools - Stack Overflow
Turns out extract text plugin causes the asset not found errors, which is normal, since the asset is loaded in bundle.css , plus...
Read more >Fixed Assets CS: Clients missing or not listed on Open Client ...
If the client is still not available follow the steps below. Close the Open Client dialog. Choose Help > Repair and click the...
Read more >asset.getUrl() not correct: missing subfolder directory
I created a new asset source/folder called "my-assets". It has an entry in the DB in "craft_assetsources" with the id=10, path="my_base_folder/ ...
Read more >Simple Asset Helper Functions | CSS-Tricks
should not include trailing slash /// @access public /// @type String $asset-base-path: '../assets' !default; /// Asset URL builder ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s a tricky one to get paths right. The code snippet you posted should be working.
Quick Q whilst I’m here, any idea why
app.use('/static', express.static(path.join(__dirname, 'build/static')));
doesn’t appear to be loading any static files?