suevalov / next-blog-firestore Goto Github PK
View Code? Open in Web Editor NEWExample of blog built with React, Next.js, Firebase Firestore, Styled-Component, Mobx State Tree and other cool technologies
License: MIT License
Example of blog built with React, Next.js, Firebase Firestore, Styled-Component, Mobx State Tree and other cool technologies
License: MIT License
After all steps described in readme get error 404 before page starts loading on attempt to go to /admin page.
It will be quite useful if we can utilize the Firebase hosting. Any plans to convert to a static single app with next export
or something else?
I've done a little experiment but no luck by simply adding a few lines into next.config.js
:
exportPathMap: function() {
return {
'/': { page: '/' }
}
}
It turns out to be:
./node_modules/next/dist/bin/next export
using build directory: /Users/legend/github/next-blog-firestore/.next
copying "static" directory
exporting path: /
TypeError: Cannot read property 'cookie' of undefined
at Function.getInitialProps (/Users/legend/github/next-blog-firestore/.next/dist/pages/_document.js:147:41)
at _callee$ (/Users/legend/github/next-blog-firestore/node_modules/next/dist/lib/utils.js:36:30)
at tryCatch (/Users/legend/github/next-blog-firestore/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/Users/legend/github/next-blog-firestore/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/Users/legend/github/next-blog-firestore/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/Users/legend/github/next-blog-firestore/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /Users/legend/github/next-blog-firestore/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
at new Promise (<anonymous>)
at new F (/Users/legend/github/next-blog-firestore/node_modules/core-js/library/modules/_export.js:35:28)
at /Users/legend/github/next-blog-firestore/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12
Thank you for making this.
I can open /admin.
But, I can't post new articles because I can't create category.
How could I create blog category??
It could just be my environment, but in order to get the admin to run correctly I had to add a .babelrc file to the root with the following to utilize decorators:
{
"presets": [
"next/babel"
],
"plugins": [
"transform-decorators-legacy"
]
}
Great project though - thanks for sharing!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.