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

Uncaught Error: Cannot find module "child_process" at webpackMissingModule #6

Closed
huan opened this issue Mar 23, 2018 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@huan
Copy link
Member

huan commented Mar 23, 2018

When using @chatie/graphql in Ionic3, we got this error message.

It seems that export LocalServer in our main index.ts cause this WebPack error, even we never import it.

See Also

  1. Last publish breaks webpack build.  d3/d3-request#24 (comment)
  2. Decouple the node side code and the browser side code alxshelepenok/lumen#51
  3. require("child_process") webpack/webpack#744

BTW: another related problem is when @chatie/graphql are using pkg-up to find package.json in local directories, the ionic will build without error or warning, but shows a Runtime Error Cannot read property 'prototype' of undefined .

@huan huan added the bug Something isn't working label Mar 23, 2018
@huan
Copy link
Member Author

huan commented Mar 24, 2018

add browser: { fs: false, child_process: false } to the package.json would do the trick

See: asvd/jailed#22

huan added a commit that referenced this issue Mar 24, 2018
@huan
Copy link
Member Author

huan commented Mar 26, 2018

It seems the problem solved.

@huan huan closed this as completed Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant