Comments (5)
If I add:
import Amplify from "aws-amplify"
import awsconfig from "./../aws-exports"
import { withAuthenticator } from "aws-amplify-react"
Amplify.configure(awsconfig)
Without any actual use, the build-html
step of Gatsby crashes with a very weird error:
Error: /Users/alexander/Projects/bodycode/www/public/render-page.js:74355
{}.DEBUG = namespaces;
^
SyntaxError: Unexpected token .
Referring to render-page.js
snippet:
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
if (null == namespaces) {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete {}.DEBUG;
} else {
{}.DEBUG = namespaces;
}
}
Is there some kind of expected environment variable that is missing that is causing this?
I have no idea how to go about debugging this...
from gatsby-auth-starter-aws-amplify.
the bug I'm talking about here is worked-around using escaladesports/legacy-gatsby-plugin-prefetch-google-fonts#18 and actually related to debug
library used as dependency of gatsby.
So you can close the error part of this issue.
Still wondering why you didn't use the HOC though 😄
from gatsby-auth-starter-aws-amplify.
Hey, thanks for the issue! I'm not using withAuthenticator
because many people want to have custom control over their auth, so I created this project. I would also suggest using withAuthenticator if it suits your needs though.
from gatsby-auth-starter-aws-amplify.
Also, I've updated the dependencies and upgraded the Gatsby project, this should work now. @aldegoeij
from gatsby-auth-starter-aws-amplify.
how would you access the users data after withAuthenticator() has been called and the Auth.currentAuthenticatedUser() has been called. lets say i was using withAuthenticator() to protect a profile page ... as soon as the user is authenticated the profile page will be accessible but the data from that user data is not able to be accessed before that profile page is displayed.
from gatsby-auth-starter-aws-amplify.
Related Issues (20)
- Amplify status without data
- Amplify Console build error HOT 3
- Can't Build Project HOT 1
- gatsby dependencies fail to install when using "next" in package.json HOT 2
- Browser refresh causes auth errors HOT 1
- Security vulnerability: sensitive user fields in local storage HOT 3
- Fail to start... HOT 7
- NPM package error: Error: Cannot create as TypeComposer the following value: Date. HOT 2
- SSR part of gatsby build fails due to AWS Amplify client libraries not being "Node safe" HOT 1
- Refreshing a route while logged in redirects to index.html HOT 4
- Permission Error HOT 1
- GATSBY STARTER IS NOT STARTING UP HOT 1
- NOT ABLE TO SIGN UP HOT 5
- Lambda functions need to be updated to nodejs12.x runtime
- Error signing up in demo site HOT 1
- gatsby site will not start due to major error HOT 13
- Change cognito userpool?
- Update gatsby-node.js and / or gatsby-ssr.js for server-side rendering
- AWS Amplify configure step requests should not request full Admin policy
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 gatsby-auth-starter-aws-amplify.