h2non / nar

node.js application archive - create self-contained binary like executable applications that are ready to ship and run
MIT License
428 stars 23 forks source link

Cannot find module unicode #142

Closed mostr closed 8 years ago

mostr commented 8 years ago

I'm having https://github.com/dodo/node-slug as project dependency in package.json. It requires unicode that gets installed too. App is working fine, but I'm getting this error below when packaging it with NAR

$ nar create -o app
Creating archive...
Error: Cannot find module 'unicode' from '/Users/mostr/app/node_modules/slug'

Any hints?

h2non commented 8 years ago

require.resolve is not able to resolve that package. A main entry should be defined in package.json, or we can add an exception in resolve-tree package for it.

zaventh commented 8 years ago

I'm running in to a similar problem.

Error: Cannot find module 'timers-ext' from '[redacted]/node_modules/[redacted]/node_modules/memoizee'

Even if I npm i timers-ext --save from my app, I get the same error. I looked at resolve-tree, but I am not sure how to resolve really.

h2non commented 8 years ago

@zaventh Same problem: timers-ext has no explicit resolution module in package.json: https://github.com/medikoo/timers-ext/blob/master/package.json

I can add an exception in resolve-tree.

h2non commented 8 years ago

This should be fixed now. Feel free to update nar:

npm update -g --force nar