This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Tobia Crivellari
Posted Nov 16 - Read on Facebook

Hello everyone! Very new to framer!

Trying to create a simple animation when tapping on an image and cycle through 3 states. got the file set up, add states and click event – see image attached...but I keep getting this error "[framer.js] ReferenceError: Can't find variable: LinearAimator".

Can you please help me with that?

Thank you!! :-)

20 Comments

Giovanni Caruso

Hi! Which version of Framer are you using? Recently the whole way of declaring states has been revamped - e.g. "layerA.states.stateA = x: 100" -- more here: https://framerjs.com/docs/#layer.states

Henrique Gusso

This same code certainly works here. Did you try copy and pasting this code onto a new project in Studio?

Tobia Crivellari

Do you guys see any error on the code?

Tobia Crivellari

Henrique Gusso Giovanni Caruso Thanks you guys for your help! Really appreciate!

Tobia Crivellari

Could be because the image source path?

Tobia Crivellari

Henrique Gusso I tried to copy on an new document, and it's not working..also I couldn't see the image anymore.. :-/

Henrique Gusso

the same code works for me if you copy and paste the image from the older file to the new file. it's at project.framer/images

Tobia Crivellari

No idea..still.. opened file share by you Henrique Gusso, and all good.. copy the code form Giovanni Caruso in my "sample" document, plus in a empty new document..and still.. check this out.. :-/ Never ending story.. LOL! :-D

Tobia Crivellari

And... Framer is up to date...

Tobia Crivellari

Also quit and re-opened Framer couple of time..but still.. no success..

Tobia Crivellari

I'm off to bed guys! I'll check back tomorrow and give it another fresh try.. thanks for your help! Really appreciate guys!! :-) I'll keep you posted!

Jordan Robert Dobson

I can take a look on my 🚂 ride home.

Kenneth Spry

I've gotten the same error. You're not crazy.

Chris Camargo

Tobia Crivellari, line 36 in your original post. Should be "spring(300,20,0)" with no space.

Jordan Robert Dobson

Here's a working version that cleans up a few syntax things to simplify and shows the error with that line commented out.

Comment it back in to see the error happen on line 29

http://jrdn.io/3e34382s0e3d

Tobia Crivellari

Thanks you guys for all your help! really appreciate!!! :-) You rock!!

Niels van Hoorn

Hmmm, this definitely should fail more gracefully, actually the error you're seeing is caused by a failed attempt to fall back on a linear animation curve

Koen Bok

Wauw yeah this should handle more gracefully. I'll fix it.

Koen Bok

Ok yeah this definitely fixed in latest. But I added a test just to be sure it never breaks again: https://github.com/koenbok/Framer/commit/1cb21a3d6aff1129ae648423f7b62ea6cb499cf0

If you update to the latest Framer library with File -> Update Framer... you'll be fine.

Read the entire post on Facebook