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

Handling peer dependencies. #3

Closed
idkjs opened this issue Feb 3, 2020 · 6 comments
Closed

Handling peer dependencies. #3

idkjs opened this issue Feb 3, 2020 · 6 comments

Comments

@idkjs
Copy link

idkjs commented Feb 3, 2020

After installing this package and a react then running, console streams out errors relating to missing dependencies like in output below.

Is there a recommended way to install this? Are we expected to install all the possible options?

Thank you.

[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'atomico' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'augmentor' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'component-register-hooks' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'dom-augmentor' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'fn-with-hooks' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'fuco' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'haunted' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'neverland' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'plumejs' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'preact/hooks' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'rax' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'spect' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
[webpack]
[webpack] WARNING in ./node_modules/any-hooks/index.js
[webpack] Module not found: Error: Can't resolve 'tng-hooks' in '/Users/prisc_000/Downloads/bs-use-fetch-demo/node_modules/any-hooks'
[webpack]  @ ./node_modules/any-hooks/index.js
[webpack]  @ ./src/BsUseFetch/AnyHooksUseFetch.bs.js
[webpack]  @ ./src/BsUseFetch/NoReactAnyHooks.bs.js
[webpack]  @ ./src/Index.bs.js
@dy
Copy link
Owner

dy commented Feb 4, 2020

Yes, that optional externals webpack issue troubled me too webpack/webpack#7713.
Unfortunately there's no way to mute that warning in webpack, unless maintainers agree to accept patch or move to verbose mode. Other bundlers don't raise warning.

@dy
Copy link
Owner

dy commented Feb 4, 2020

I guess I could provide direct entries like import hooks from 'any-hooks/preact', that'd solve the issue.

@dy
Copy link
Owner

dy commented Feb 4, 2020

Ok, providing direct entries doen't make much sense, since any-hooks is supposed to be used as foundation for hooks libraries - same way they can trivially be set up as import setHooks, {} from 'any-hooks'; setHooks(targetHooks);

To suppress webpack warnings, see stats option:

module.exports = {
  //...
  stats: {
    warnings: false
  }
};

@dy dy closed this as completed Feb 4, 2020
@idkjs
Copy link
Author

idkjs commented Feb 4, 2020

Thanks. Messed with the webpack some with your suggestion. Seems like always get the warning which i guess doesn't harm the project but might confuse users of a module. Thanks for sharing your project.

@dy
Copy link
Owner

dy commented Feb 4, 2020

I'll try to reduce amount of errors.

@dy
Copy link
Owner

dy commented Feb 4, 2020

Ok, removed some packages with low popularity.
Update to 4.1.0.

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

2 participants