Cannot resolve module `deep-object-diff`
stefanfrede opened this issue · comments
After installing I get the error Cannot resolve module 'deep-object-diff'
.
I installed and implemented it the way you provided:
npm i --save deep-object-diff
import { updatedDiff } from 'deep-object-diff';
Hey @stefanfrede seems strange!
I've just tried it myself and all seems to be working OK, I'd say that it is probably something going wrong with your setup. Are you able to share a reproduction repo with the problem?
Have you tried deleting your project node_modules
and doing a fresh install and then check the package is in your node_modules
.
Hi!
I set up a test repo (https://github.com/stefanfrede/deep-object-diff-test-repo), and there it is working fine.
I tried again in my project, and I get Cannot resolve module
deep-object-diff.:
.
I then deleted node_modules
and did a fresh install, and the package seems to be installed, but I get the same error.
I have no clue what is going wrong, but I guess there is some interference with another/other package/packages.
I found the culprit. It is flow. I removed /* @flow */
which stopped the type checking for the file and the error message disappeared.
I'm closing this because I solved it (somehow).