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

What is Framer? Join the Community
Return to index
Dan Jones
Posted Jun 30 - Read on Facebook

Help! I'm trying to use NPM to pull in a module from our enterprise GitHub instance but I just get an "Error: cannot find module" message in the debugger when I try to reference it in my Framer prototype.
I've tried following the Backbone example on the Framer JS docs website but get the same result.
Any suggestions of where to start investigating?

6 Comments

Mike Hughes

Hi Dan Jones I have the same problem, I followed the doco word for word under the Modules / Example:NPM just as a test, becuase I was having problems getting another module to work. Found the backbone example does not seem to work, I get a "Error: Cannot find module 'jquery' " as soon as the npm.coffee file has the line exports.backbone = require "backbone". Koen Bok are NPM modules in Framer a bit "broken" right now ? Or is the doco wrong ?

Dan Jones

So I solved one part of the puzzle - the module on our internal GitHub wasn't being being compiled to JavaScript...

Giovanni Caruso

Any update on this? Still having issues. I tried to go back to the backbone example in the doc session, but I get ModuleBuildError: modules' near' at etc.

Marc Krenn

Can't get any npm modules to work :/
(Protip: 'backbone' requires 'jquery')

Could you look into this, Koen? Thanks.

Koen Bok

I'll look into this

Eelco Lempsink

It seems the example in the docs is broken, since building Backbone fails because it tries to use jQuery (without listing it as a dependency, which is also isn’t). However, I don’t have problems using other npm modules, like ‘moment’.

Read the entire post on Facebook