TylerBarnes / gatsby-plugin-transition-link

A link component for page transitions in gatsby
537 stars 71 forks source link

Can't resolve 'gatsby-plugin-transition-link/AniLink' #217

Closed BrieucCaillot closed 4 years ago

BrieucCaillot commented 4 years ago

Hi! I'm getting this error :

ERROR #98124  WEBPACK
Generating SSR bundle failed
Can't resolve 'gatsby-plugin-transition-link/AniLink' in '/Users/Brieuc/Sites/GITHUB/portfolio/src/components'
If you're trying to use a package make sure that 'gatsby-plugin-transition-link/AniLink' is installed. If you're trying to use a local file make sure that the path is correct.
File: src/components/Header.js

when i'm importing AniLink like this in src/components/Header.js :

import AniLink from "gatsby-plugin-transition-link/AniLink"

<AniLink paintDrip to="/works">
   Works
</AniLink>

I did yarn add gatsby-plugin-transition-link & then added gatsby-plugin-transition-link to the plugin array of gatsby-config.js

Any idea ?

luchoster commented 4 years ago

Running into the same issue, no matter what I do, it won't work.

TylerBarnes commented 4 years ago

Hey @BrieucKyo thanks for opening an issue. Can you share a reproduction repo of this issue? Did a recent upgrade cause the problem?

gabrielste1n commented 4 years ago

Running into the same issue, no matter what I do, it won't work.

Same, It's been running fine for months now, did a fresh build (deleted yarn.lock and node modules and then Yarn install) now won't work at all no matter what.

xaviemirmon commented 4 years ago

Same here

hrishikesh-k commented 4 years ago

@TylerBarnes yeah, a recent update caused this issue for me. I returned to edit my website after quite a few days now, and so, decided to update all dependencies. After editing tha package.json manually, I deleted my package-lock.json and node_modules folder to do a fresh install. The problem started after that.

The previous version I was using:

"gatsby-plugin-transition-link": "^1.18.0", "gsap": "^3.3.3",

This works fine.

I updated it today to:

"gatsby-plugin-transition-link": "^1.19.2", "gsap": "^3.3.4",

This causes the mentioned problem.

UPDATE: Even after reverting to the older version, the issue persists.

felixkwan commented 4 years ago

Same here. just update to the latest version "gatsby-plugin-transition-link": "^1.19.2",

jlison commented 4 years ago

I am experiencing the same issue as well. I tried updating without success. As soon as I delete my package-lock Webpack won't be able to resolve gatsby-plugin-transition-link/AniLink.

TylerBarnes commented 4 years ago

Can anyone share a repo that has this issue?

hrishikesh-k commented 4 years ago

I don't have a repo, but, here's the source of my website if it works: https://www.dropbox.com/s/8k4uuifdnsjwiul/HriTech.zip?dl=0

BrieucCaillot commented 4 years ago

@TylerBarnes Here is a gatsby default starter with gsap & gatsby-plugin-transition-link installed. https://github.com/BrieucKyo/gatsby-plugin-transition-link

TylerBarnes commented 4 years ago

Hey everyone, apologies for this! This was a publishing mistake 🤦 since it's been a while since I published this package I did it wrong. Upgrade to gatsby-plugin-transition-link@1.20.0 for a fix!

I will be automating the publishing step and adding some tests to prevent this from happening again https://github.com/TylerBarnes/gatsby-plugin-transition-link/issues/218

gabrielste1n commented 4 years ago

Hey @TylerBarnes, thanks for jumping on this issue so quickly! I implemented the proposed fix but am now getting WebpackError: ReferenceError: window is not defined when trying to build. I wasn't getting this before, any ideas as to what the issue could be?

hrishikesh-k commented 4 years ago

Oh my God, I am not the only one! I just opened a issue on Gatsby thinking I made some problem with my build. I was so lost, but, there's some hope maybe, afterall?

gabrielste1n commented 4 years ago

Oh my God, I am not the only one! I just opened a issue on Gatsby thinking I made some problem with my build. I was so lost, but, there's some hope maybe, afterall?

Glad to hear I'm not the only one too

TylerBarnes commented 4 years ago

Checking it out now, should have a fix up shortly! It looks like that's due to a bug in the version that was incorrectly published. Def need to get some automated tests set up sooner than later

TylerBarnes commented 4 years ago

@gabrielste1n @Hrishikesh-K a fix is published in gatsby-plugin-transition-link@1.20.2!

gabrielste1n commented 4 years ago

@gabrielste1n @Hrishikesh-K a fix is published in gatsby-plugin-transition-link@1.20.2!

Can confirm it is working for me, thanks so much!

hrishikesh-k commented 4 years ago

Thanks for the quick fixed @TylerBarnes. All good now.

TylerBarnes commented 4 years ago

Great to hear! Let me know if anything else comes up

ivanovicsolaro commented 4 years ago

In my case, follow these steps: