jsedn icon indicating copy to clipboard operation
jsedn copied to clipboard

Installing then requiring the module results in error

Open ashnur opened this issue 10 years ago • 6 comments

Error: Cannot find module 'type' from '/home/ashnur/foo/node_modules/jsedn/lib'

ashnur avatar Feb 08 '16 11:02 ashnur

:+1: @shaunxcode any ideas?

Samstiles avatar Mar 09 '16 19:03 Samstiles

@ashnur not sure if you're still stuck on this or not, but I was running into the same issue. Looks like it was trying to bring in something from component.js and getting a little confused or sad. I was able to fix the issue by doing the following:

  • adding "component-type": "latest" to package.json
  • inside type.coffee, changing require "type" to require "component-type"
  • rebuilding
  • npm linking the project

You may need to fork this project and have npm point at your fork rather then the npm repo (until this gets resolved).

Hope this helps!

npfitz avatar Mar 15 '16 15:03 npfitz

Please make a pull request or a fork where it works :) Anyone?

kristianmandrup avatar Mar 25 '16 13:03 kristianmandrup

@kristianmandrup have you tried @npfitz 's suggestions?

ashnur avatar Mar 26 '16 10:03 ashnur

I am also having this issue. I'm not exactly sure i get all of @npfitz instructions.

Are they saying that I should download my own copy of jsedn, make that modification and then npm link my local copy?

I feel like I'm doing something wrong -- seems weird that the recommended edn library in JS can't actually be required and used when installed via npm.

yedi avatar Sep 06 '17 21:09 yedi

@yedi Admittedly, it's probably a terrible suggestion (though I've been running with that change for a while now). What I did was make my own fork of the project, made my change, and then just pointed to NPM to my fork.

npfitz avatar Sep 07 '17 02:09 npfitz