Open matthewharwood opened 5 years ago
https://github.com/developit/preact-render-to-string/releases/tag/5.0.2
fixed in this preact-render-to-string release, but needs to be updated in preact-cli
@kidqueb I installed preact-cli@rc.1
and it seems to be getting further; however, now I'm getting a new error
matty@laptop: ~/Github/genesis/www/mh on logo [!]
$ npx preact build
Build [] 95% (2.7s) emitting
ssr-bundle.60186.css ⏤ 495 B (+495 B)
ssr-bundle.js ⏤ 17.8 kB (+17.8 kB)
Build [] 10% (0.0s) building(node:13069) DeprecationWarning: Tapable.apply is deprecated. Call apply on the plugin directly instead
Build [] 90% (1.2s) module assets processing✖ ERROR TypeError: Cannot read property 'hasErrors' of undefined
at showStats (/Users/matty/Github/genesis/www/mh/node_modules/preact-cli/lib/lib/webpack/run-webpack.js:118:12)
at compiler.run (/Users/matty/Github/genesis/www/mh/node_modules/preact-cli/lib/lib/webpack/run-webpack.js:106:4)
at finalCallback (/Users/matty/Github/genesis/www/mh/node_modules/webpack/lib/Compiler.js:220:39)
at onCompiled (/Users/matty/Github/genesis/www/mh/node_modules/webpack/lib/Compiler.js:228:20)
at compilation.seal.err (/Users/matty/Github/genesis/www/mh/node_modules/webpack/lib/Compiler.js:626:23)
at hooks.optimizeChunkAssets.callAsync.err (/Users/matty/Github/genesis/www/mh/node_modules/webpack/lib/Compilation.js:1317:14)
at _promise1.then._err1 (eval at create (/Users/matty/Github/genesis/www/mh/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:22:1)
Recreate:
npm install -g preact-cli
preact create default my-project
cd my-project
prerender-urls.json
into rootdirrm -rf node_modules package-lock.json
npm uninstall preact preact-router --save && npm install preact@next preact-router@next
npm run build
Will throw this error:
If you change the router to
2.6.1
and preact to latest ssr/prerender works just fine.Any help?