framerx-build-system icon indicating copy to clipboard operation
framerx-build-system copied to clipboard

ReferenceError: Can't find variable: Framer

Open jeffpowrs opened this issue 5 years ago • 2 comments

First and foremost, thank you for providing this codebase to the public along with your blog post. The possibility of coupling production React.js components with design components is very exciting.

I'm aware that this is all very experimental at this point but I am attempting to follow along with the blog post Bringing Design System Components from Production Into Framer X and I am seeing a strange error.

I have:

  • cloned the repository
  • ran yarn install
  • ran yarn build
  • opened design-system.framerx in Framer X.

I have not edited the code in any way but when I design-system.framerx in Framer X I get the following errors:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (framer.debug.js, line 0)
[Error] ReferenceError: Can't find variable: Framer
	(anonymous function) (preview.js:1:92908)
	r (preview.js:1:115)
	(anonymous function) (preview.js:1:528216)
	r (preview.js:1:115)
	(anonymous function) (preview.js:1:533117)
	r (preview.js:1:115)
	(anonymous function) (preview.js:1:519)
	Global Code (preview.js:1:529)

I am attempting to debug it but am wondering if you have any insights into why Framer would be undefined.

jeffpowrs avatar Sep 27 '18 17:09 jeffpowrs

I am having the same problem.

iconifyit avatar Apr 25 '19 03:04 iconifyit

Actually I just figured this out. The fix is very simple. I don't know why the Framer node_module is not being installed but it isn't. To install it (On Mac):

  1. Open a Terminal window (Applications > Utilities > Terminal) and type "cd" followed by a space
  2. In Framer, go to "File > Show Project Folder"
  3. Drag and Drop the project folder into the terminal window where you typed 'cd' then click enter in the terminal window
  4. In the Terminal window type npm install framer

That should fix your problem.

iconifyit avatar Apr 25 '19 03:04 iconifyit