question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Currently you need `MORALIS_APPLICATION_ID` and `MORALIS_SERVER_ID` for nextjs

See original GitHub issue

New Feature Request

Checklist

Current Limitation

Right now, users have to get an appId and ServerId to use moralis, it would be great if this wasn’t the case.

Steps to reproduce:

  1. npx create-next-app
  2. npm install react-moralis
  3. Go to _app.js and make the file look like:
import '../styles/globals.css'
import { MoralisProvider } from "react-moralis";

const moralisAppId = process.env.MORALIS_APPLICATION_ID || "xxxxxxxx"
const moralisServerId = process.env.MORALIS_SERVER_ID || "xxxxxxxx"

function MyApp({ Component, pageProps }) {
  return (
    <MoralisProvider appId={moralisAppId} serverUrl={moralisServerId}>
      <Component {...pageProps} />
    </MoralisProvider>
  )
}

export default MyApp
  1. Run npm run dev

You’ll get a wonderful error on the site after a refresh. However, if you add the appId and serverURL, this works fine.

Feature / Enhancement Description

The idea is to make it so that it can render ever without the appId and serverUrl, this way, someone could always use moralis even if they didn’t make a server.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
PatrickAlphaCcommented, Feb 2, 2022

Been playing around with it for some time, and it’s amazing!! Exactly what I was thinking.

1reaction
PatrickAlphaCcommented, Jan 29, 2022

EXCITED TO TRY

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next.js by Vercel - The React Framework
Next.js gives you the best developer experience with all the features you need for production: hybrid static & server rendering, TypeScript support, ...
Read more >
Deployment
Congratulations, you are ready to deploy your Next.js application to production. This document will show how to deploy either managed or self-hosted using...
Read more >
How Next.js Works | Learn Next.js
In the next sections, we'll look at what happens to your application code during these different stages: The environment where your code runs:...
Read more >
Blog - Next.js 13
Today, we're improving the routing and layouts experience in Next.js and aligning with the future of React with the introduction of the app ......
Read more >
Advanced Features: Next.js Compiler
Compilation using the Next.js Compiler is 17x faster than Babel and enabled by default since Next.js version 12. If you have an existing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found