Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'redial' #14

Closed
DWboutin opened this issue Nov 2, 2016 · 4 comments
Closed

Cannot find module 'redial' #14

DWboutin opened this issue Nov 2, 2016 · 4 comments

Comments

@DWboutin
Copy link

DWboutin commented Nov 2, 2016

I just installed it and it makes this error. Maybe it should be installed when we run npm install react-router-redial? I solve my problem by installing it manually.

Error: Cannot find module 'redial'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/Mike/Desktop/react-webpack-startup/node_modules/react-router-redial/lib/triggerHooks.js:11:15)
    at Module._compile (module.js:556:32)
    at Module._extensions..js (module.js:565:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/Mike/Desktop/react-webpack-startup/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
@dlmr
Copy link
Owner

dlmr commented Nov 2, 2016

Hello!

redial is not included by default, the reason for the error you get, but a part of peerDependencies. Maybe we should update the README to make this more clear?

So if you already have React and React Router in your project you will need to do the following to get everything you need:

npm install --save react-router-redial redial

@dlmr dlmr closed this as completed in 7025def Nov 3, 2016
@DWboutin
Copy link
Author

DWboutin commented Nov 3, 2016

It didn't bothered me a lot, but when i install a package, it is fully ready with it's dependencies.

@PAkerstrand
Copy link
Collaborator

@DWboutin: while I understand that it can be confusing/annoying, using peerDependencies allows us to work with multiple versions of redial and let the client decide which of the compatible versions to use. This avoids more subtle bugs such as having multiple versions of redial where the Symbol would differ and thus not trigger any hooks

@DWboutin
Copy link
Author

DWboutin commented Nov 3, 2016

With your add to the Read.me, it's perfect for me and future users!

Thank you and great package btw!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants