Comments (8)
@kylehotchkiss I think your solution was actually pretty close. I just did a npm i babel-runtime --save
in the functions
folder (not the app
) and it seems to work so far.
from firebase-functions-next-example.
@jthegedus I am facing similar problems. Please post your solution :)
Thank you.
from firebase-functions-next-example.
@gulukul The new code is live on this repo, give it a read to see the changes before running. It should solve this particular problem (and some other issues).
@flexlee I'm writing it atm, should be published before this coming weekend. It'll explain everything from scratch (not assuming any knowledge of the prior implementation).
Sorry for the delay but I've spread myself too thin and haven't been able to get around to everything. I'm starting to get on top of everything. Triaging my repos and getting these associated blog posts out is priority 1. Thanks for your patience.
from firebase-functions-next-example.
The reason I went with this file structure is that I too had problems using Babel. Next.js searches for Babel files higher in the path and uses those if found which causes problems with its own internal Babel settings. Where were you putting the Babel file and where were you using the spread operator?
from firebase-functions-next-example.
I have a very similar issue. I changed the sample to use React classes like this in pages/index.js
import React from "react";
import Header from "../components/Header";
class Index extends React.Component {
render() {
return (
<div>
<Header />
<p>Hello</p>
</div>
);
}
}
export default Index;
This leads to a 500 and a similar Babel issue in the logs: Cannot find module 'babel-runtime/core-js/object/get-prototype-of'
from firebase-functions-next-example.
Hey all, I've got a new solution coming out over the weekend that should solve this problem, it's a much simpler setup. Thanks for taking the time to post and sharing your solutions 😄
from firebase-functions-next-example.
@jthegedus Thanks for the solution. Is your post coming out soon?
from firebase-functions-next-example.
I'll consider this closed since this is no longer a problem with the new repo example. I'm still working on the new Medium post which I will link here when finished (or you can follow me on Medium to get real-time updates.
from firebase-functions-next-example.
Related Issues (20)
- inconsistent information HOT 3
- Get a mate with a Windows machine to test this repo
- Add SCSS/SASS import HOT 3
- how to user a custom HTML template for render HOT 4
- Integrate firebase realtime database example HOT 3
- Native Windows support HOT 6
- Cache-Control HOT 2
- style jsx doesn't work on firebase but does on local dev server HOT 2
- Why the projcet dont have a <Head> component? HOT 1
- Cannot find module 'babel-runtime/regenerator' HOT 7
- Error: Cannot find module '/user_code/next/server/pages-manifest.json' HOT 6
- Anyone had any luck with firebase functions on node 8 and next 6.1 HOT 3
- @google-cloud/functions-emulator | Suggested Solution HOT 2
- Image assets HOT 3
- Working with service worker offline HOT 1
- Incorporating Firebase Auth HOT 1
- 'NODE_ENV' is not recognized as an internal or external command HOT 1
- Unexpected identifier prepare() on function deploy HOT 1
- not working on new versions of nextjs 4 and react 16 HOT 11
- Can not deploy when dev = false HOT 2
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 firebase-functions-next-example.