nextjs-firebase-authentication
nextjs-firebase-authentication copied to clipboard
Module not found: Can't resolve '../../data/courses'
I've had some issues with npm install, it seems to of cherry picked what to install so I had to manually install some stuff, the site somewhat works in that /sign-up and /login-in work but when I go to the index page it produces that error on the client.
Network error: Unexpected token I in JSON at position 0 Error: Network error: Unexpected token I in JSON at position 0 at new ApolloError (C:\Users\Admin\Desktop\project\nextjs-firebase-authentication\node_modules\apollo-client\bundle.umd.js:92:26) at C:\Users\Admin\Desktop\project\nextjs-firebase-authentication\node_modules\apollo-client\bundle.umd.js:1588:34 at C:\Users\Admin\Desktop\project\nextjs-firebase-authentication\node_modules\apollo-client\bundle.umd.js:2008:15 at Set.forEach (<anonymous>) at C:\Users\Admin\Desktop\project\nextjs-firebase-authentication\node_modules\apollo-client\bundle.umd.js:2006:26 at Map.forEach (<anonymous>) at QueryManager.broadcastQueries (C:\Users\Admin\Desktop\project\nextjs-firebase-authentication\node_modules\apollo-client\bundle.umd.js:2004:20) at C:\Users\Admin\Desktop\project\nextjs-firebase-authentication\node_modules\apollo-client\bundle.umd.js:1483:29 at process._tickCallback (internal/process/next_tick.js:68:7)
and this error on the terminal,
error ] ./src/services/course/index.ts
[0] Module not found: Can't resolve '../../data/courses' in 'C:\Users\Admin\Desktop\project\nextjs-firebase
[0] { Error: Cannot find module for page: /api/graphql
[0] at pageNotFoundError (C:\Users\Admin\Desktop\project\nextjs-firebase-authentication\node_modules\ne
[0] at Object.getPagePath (C:\Users\Admin\Desktop\project\nextjs-firebase-authentication\node_modules\n
[0] at DevServer.getPagePath (C:\Users\Admin\Desktop\project\nextjs-firebase-authentication\node_module88:26)
[0] at DevServer.handleApiRequest (C:\Users\Admin\Desktop\project\nextjs-firebase-authentication\node_m.js:429:42)
[0] at process._tickCallback (internal/process/next_tick.js:68:7) code: 'ENOENT' }
[0] Network error { ServerParseError: Unexpected token I in JSON at position 0
[0] at JSON.parse (
This seems to be due to src/data/courses appearing in the .gitignore. @rwieruch likely wanted to protect his IP while still providing everyone a MVP implementation of the platform.
Copying the content of src/data/course-storefront.ts into src/data/courses.ts will clear the error, though obviously this limits the ability to run the demo.
@rwieruch, any way we could at least get a skeleton of which attributes/methods/etc would go in that file? While we could probably reverse-engineer it, it's leveraged as part of your resolvers and connectors in a variety of places, so having it be bugged means most of the demo doesn't function.
Edit: seems like that was a directory in February, contained an index.ts with references to other course files (e.g., src/data/courses/road-to-react). It may not actually be possible to run this demo without some IP being exposed or a specially-tailored course being built.
I think I will go through this project in the future and get rid of all the course relevant source code, so that there is only the skeleton for nextjs with firebase as planned in the first place. Sorry for this!
That'd be awesome - thanks for making the project available like this! Even in its current state it's providing help for me when establishing good patterns on an altogether different type of platform.
Hey @rwieruch, Can you provide the tutorial for this problem?