Module not found - after updating to 18.0.1
vstrelianyi opened this issue · 2 comments
after updating to 18.0.1 from 17 I try to import the dependency like this:
import createUploadLink from 'apollo-upload-client';
OR
import { createUploadLink } from 'apollo-upload-client';
and receive the following error:
Module not found: Package path . is not exported from package D:\projects\UpWork\snackhunter\next-react-wp\frontend\node_modules\apollo-upload-client (see exports field in D:\projects\UpWork\snackhunter\next-react-wp\frontend\node_modules\apollo-upload-client\package.json)
Neither of those imports are correct. Please read the changelog instructions about how to migrate the imports.
tl;dr (but do read the release notes anyways!)
https://github.com/jaydenseric/apollo-upload-client/releases/tag/v18.0.0
The correct import statement is:
import createUploadLink from "apollo-upload-client/createUploadLink.mjs";