npm ls react-scripts (if you haven’t ejected): react-scripts@1.1.1
Operating system:OS X El Captain Version 10.11.6
Browser and version (if relevant): Google Chrome Version 63.0.3239.132 (Official Build) (64-bit)
Steps to Reproduce
create-react-app my-app
vim src/index.js
Add the line const http2 = require('http2');
The file should look like this -
import React from 'react';import ReactDOM from 'react-dom';import './index.css';import App from './App';import registerServiceWorker from './registerServiceWorker';
Is this a bug report?
Yes.
Did you try recovering your dependencies?
Yes.
npm --version 5.6.0
Which terms did you search for in User Guide?
create-reach-app in-built nodejs modules
Environment
node -v
: v9.5.0npm -v
: 5.6.0yarn --version
(if you use Yarn):npm ls react-scripts
(if you haven’t ejected): react-scripts@1.1.1Operating system:OS X El Captain Version 10.11.6
Browser and version (if relevant): Google Chrome Version 63.0.3239.132 (Official Build) (64-bit)
Steps to Reproduce
const http2 = require('http2');
The file should look like this -
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
const http2 = require('http2');
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
Expected Behavior
Should compile successfully because 'http2' is an in-built package as of node 9.0.0
Actual Behavior
Failed to compile.
./src/index.js Module not found: Can't resolve 'http2' in '/Users/workspace/my-app/src'
Reproducible Demo
Skipping this step since it is easy to reproduce. Just create a new app and add a line in index.js.