I
17d ago

Failure to import Rive artboard to Framer

I'm getting an error message in framer after pasting in the Framer code to a new code component. Here is the code:
import React, { useEffect } from "react" import { addPropertyControls } from "framer" import _ from "@rive-app/react-canvas" import RiveComponent, { componentName, propertyControls } from "https://rive.app/api/s/o_mamCFRNkm_A-YWCQlRFA/framer/" /** * @framerSupportedLayoutWidth any-prefer-fixed * @framerSupportedLayoutHeight any-prefer-fixed */ export default RiveComponent as React.ComponentType RiveComponent.displayName = componentName addPropertyControls(RiveComponent, propertyControls)

Here is the console output from Framer:

T20:01:59.313Z warn: [modules-runtime] Error in 'codeFile/Hero_Rive.tsx': Error: Unable to resolve specifier '@rive-app/react-canvas' imported from https://rive.app/api/s/o_mamCFRNkm_A-YWCQlRFA/framer/ at a0 (https://app.framerstatic.com/es-module-shims-U3QXTE66.js:4:534) at Re (https://app.framerstatic.com/es-module-shims-U3QXTE66.js:4:503) at resolveHook (https://app.framerstatic.com/chunk-ZZP2CTCY.js:1:4091) at resolve (https://project-a4zcyjyyaw6ch3aqaooc.framercanvas.com/s/app.a4439fa23b28fcd421eb703f8344773e3f81ed5a/preview-next.html?target=code-editor-preview-web&mode=dark:222:33) at i0 (https://app.framerstatic.com/es-module-shims-U3QXTE66.js:4:130) at https://app.framerstatic.com/es-module-shims-U3QXTE66.js:9:1364 at Array.map (<anonymous>) at https://app.framerstatic.com/es-module-shims-U3QXTE66.js:9:1266


Please help me! This is for an urgent project

5 replies
C
I
R
R
17d ago

Would you mind sharing a bit more information about what you are trying to do? Would it also be possible if we could take a look at the file?

C
(edited) 17d ago

Adding to 's request for more info, if we drop your component (the Rive Framer code) into a test Framer project, your animation appears to be working fine, so that code is correct.

C
17d ago

See that you also logged a ticket with Support. Feel free to reply here or in that ticket.

I
17d ago

https://rive.app/s/PJ9mBMBn7EGIqJWPUUWxsw/

Here's a share link to the current Rive file.

I'm hoping to expose the triggers I have set up in the rive file so that I can switch tabs in the state machine using a tab component in Framer.



17d ago
[deleted]