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

This dependency was not found: ./node_modules/next-apollo/dist/link.js #25

Closed
magbicaleman opened this issue Feb 20, 2019 · 5 comments
Closed

Comments

@magbicaleman
Copy link

"next-apollo": "^2.0.8",
This might be user error on my part, but I'm getting the following error below.

This dependency was not found:

  • next/dist/lib/utils in ./node_modules/next-apollo/dist/link.js
@benloeffel
Copy link

benloeffel commented Feb 20, 2019

The issue occurs for me after upgrading NextJS from version 7.0.2 to version 8.0.0

Inside ./node_modules/next-apollo/dist/link.js a variable is declared _utils which is no longer available as of NextJS Version 8.0.0.

After removing lines 58 & 257-259 the error no longer occurs.

Line 58
var _utils = require("next/dist/lib/utils");

Line 257-259

if (typeof value === 'string') {
    (0, _utils.execOnce)(_utils.warn)("Warning: You're using a string directly inside <Link>. This usage has been deprecated. Please add an <a> tag as child of <Link>");
 }

link.js is attempting to use functions (execOnce & warn) which is a function found inside the utils.js file from Next to display the following message:

Warning: You're using a string directly inside . This usage has been deprecated. Please add an a tag as child of Link

@adamsoffer
Copy link
Owner

adamsoffer commented Feb 21, 2019

Thanks for reporting this. Looks like next/dist/lib/utils moved to next-server/dist/lib/utils. Updating this path fixed that error, however, I'm currently testing with Next v8 and looks like the way we're doing data prefetching is no longer working. Will investigate.

@rubelux
Copy link

rubelux commented Feb 21, 2019

I have the same problem, can you guys fix the dependency link?

@adamsoffer
Copy link
Owner

Hey guys - I just pushed a fix in v2.0.9 that address this dependency error. Let me know if that fixed it for you. I'll open up a separate issue re: data prefetching no longer working.

@benloeffel
Copy link

Yes, I just updated dependency and the error no longer occurs on Next v8+. Thanks @adamsoffer! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants