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

What is Framer? Join the Community
Return to index
Chad Lonberger
Posted Mar 11 - Read on Facebook

Bumping this here for visibility: Had trouble trying to import npm packages as Modules. Here's the results from the underscore example mentioned in the docs.. attempted this with other packages with the same result. Any ideas? ..link added: http://share.framerjs.com/qfuutl2ac0ck/

5 Comments

Chad Lonberger

Got this working, not sure if this is the intended implementation but seems to have fixed issues I was having w/ other npm packages (check console and inline comments): http://share.framerjs.com/92mg0ociotzh/

Chad Lonberger

Looks like namespace issues between the package name and module name.. changed module name to prevent clobbering. Ex w/ immutable.js: http://share.framerjs.com/eu91hao4oake/

Mike Feldstein

Yeah definitely can't have the same name for the files in modules and node-modules, just ran into this myself. Any reason we can't just require the npm module directly in app.coffee?

Koen Bok

I'll update the docs today to make this clearer. I'll also look if I can add a way to import npm's directly.

Read the entire post on Facebook