Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken projects because of missing json-loader #146

Merged
merged 1 commit into from
Oct 29, 2016
Merged

Fix broken projects because of missing json-loader #146

merged 1 commit into from
Oct 29, 2016

Conversation

flybayer
Copy link
Contributor

I ran into this problem when trying to use prisimic.io with next.js where I get this error:

ERROR in ./~/prismic.io/lib/requests.js
Module not found: Error: Cannot resolve module 'json-loader' in /Users/b/c/thefaithnet/node_modules/prismic.io/lib
 @ ./~/prismic.io/lib/requests.js 111:16-42 148:16-42

The offending line of code in prismic.io is this:

var pjson = require('../package.json');

I only get this error after installing next.

This happens because next is set to use json-loader in server/build/webpack.js, but next doesn't have the json-loader dependency defined.

This PR adds json-loader as a dependency.

My current workaround is to add json-loader as a dependency to my project.

@rauchg
Copy link
Member

rauchg commented Oct 29, 2016

I think this is great. Thank you @flybayer

@rauchg rauchg merged commit 7501e80 into vercel:master Oct 29, 2016
@flybayer flybayer deleted the add-json-loader branch October 30, 2016 22:17
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants