Error when accessing Localhost:3000
See original GitHub issueError when accessing localhost for development, Saying no Context provider. This is a fresh download and instance of VS and the Boilerplate being ran on the local host.
Last issue gave a Compile error and missing Dependencies error: https://github.com/ethereum-boilerplate/ethereum-boilerplate/issues/24
Below is what I copied from the Photo _
NoMoralisContextProviderError: Make sure to only call useMoralis within a <MoralisProvider> NoMoralisContextProviderError.ReactMoralisError [as constructor] C:/Users/Owner/Desktop/src/Errors.ts:4 1 | export class ReactMoralisError extends Error { 2 | static isReactMoraliserrpr = true; 3 | 4 | constructor(message: string) { 5 | super(
[react-moralis]: ${message}
); 6 | this.name = “ReactMoralisError”; 7 | this.message = message; View compiled new NoMoralisContextProviderError C:/Users/Owner/Desktop/src/Errors.ts:12 9 | } 10 | 11 | export class NoMoralisContextProviderError extends ReactMoralisError { 12 | constructor(message: string) { 13 | super(message); 14 | this.name = “NoMoralisContextProviderError”; 15 | } View compiled useMoralis C:/Users/Owner/Desktop/src/hooks/useMoralis/useMoralis.ts:9 6 | const moralisContext = useContext(MoralisContext); 7 | 8 | if (!moralisContext) { 9 | throw new NoMoralisContextProviderError( | ^ 10 | “Make sure to only call useMoralis within a <MoralisProvider>”, 11 | ); 12 | } View compiled QuickStart C:/Users/Owner/Desktop/ethereum-boilerplate-main/src/components/QuickStart.jsx:26 23 | }; 24 | 25 | export default function QuickStart({ isServerInfo }) { 26 | const { Moralis } = useMoralis(); 27 | 28 | const isInchDex = useMemo( 29 | () => (Moralis.Plugins?.oneInch ? true : false), View compiled ▶ 17 stack frames were collapsed. Module.<anonymous> C:/Users/Owner/Desktop/ethereum-boilerplate-main/src/index.js:32 29 | }; 30 | 31 | /** Get your free Moralis Account https://moralis.io/ */ 32 | ReactDOM.render( 33 | // <React.StrictMode> 34 | <Application />, 35 | // </React.StrictMode>, View compiled Module…/src/index.js http://localhost:3000/static/js/main.chunk.js:8158:30 webpack_require C:/Users/Owner/Desktop/ethereum-boilerplate-main/webpack/bootstrap:851 848 | 849 | webpack_require.$Refresh$.init(); 850 | try { 851 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId)); | ^ 852 | } finally { 853 | webpack_require.$Refresh$.cleanup(moduleId); 854 | } View compiled fn C:/Users/Owner/Desktop/ethereum-boilerplate-main/webpack/bootstrap:150 147 | ); 148 | hotCurrentParents = []; 149 | } 150 | return webpack_require(request); | ^ 151 | }; 152 | var ObjectFactory = function ObjectFactory(name) { 153 | return { View compiled 1 http://localhost:3000/static/js/main.chunk.js:8536:18 webpack_require C:/Users/Owner/Desktop/ethereum-boilerplate-main/webpack/bootstrap:851 848 | 849 | webpack_require.$Refresh$.init(); 850 | try { 851 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId)); | ^ 852 | } finally { 853 | webpack_require.$Refresh$.cleanup(moduleId); 854 | } View compiled checkDeferredModules C:/Users/Owner/Desktop/ethereum-boilerplate-main/webpack/bootstrap:45 42 | } 43 | if(fulfilled) { 44 | deferredModules.splice(i–, 1); 45 | result = webpack_require(webpack_require.s = deferredModule[0]); | ^ 46 | } 47 | } 48 | View compiled Array.webpackJsonpCallback [as push] C:/Users/Owner/Desktop/ethereum-boilerplate-main/webpack/bootstrap:32 29 | deferredModules.push.apply(deferredModules, executeModules || []); 30 | 31 | // run deferred modules when all chunks ready 32 | return checkDeferredModules(); | ^ 33 | }; 34 | function checkDeferredModules() { 35 | var result; View compiled (anonymous function) http://localhost:3000/static/js/main.chunk.js:1:93
Issue Analytics
- State:
- Created 2 years ago
- Comments:10
Top GitHub Comments
Found a way to solve it. Just needed to install Live Server extension on Visual Studio Code.
i still have the same issue even after restart computer and installed Live Server extension. anything else i should check?