# Bug report ## Describe the bug Errors are shown in the logs when trying to import `child_process` in an api function. ## To Reproduce Steps to reproduce the behavior, please provide code snippets or a repository: 1. Create an api function ```js // /pages/api/hello.js import 'child_process'; export default (req, res) => { res.end('hello'); }; ``` 2. start next dev server 3. visit `http://localhost:3000/api/hello` in the browser 4. See error ``` [ error ] ./pages/api/hello.js Module not found: Can't resolve 'child_process' in '<project-root>/pages/api' ``` ## Expected behavior No error ## Screenshots If applicable, add screenshots to help explain your problem. ## System information - OS: macOS - Version of Next.js: 8.1.1-canary.28 ## Additional context Functionally there doesn't seem to be any problem, looks like it's just a logging problem.