How do I import modules from outside src directory?
./src/App.js
Module not found: Can't resolve 'material-ui' in '/Users/suvo/GitHub/portfolio/src'
According to react-material-icons
page, I was supposed to import as follows:
import mui from 'material-ui';
the error's strange. i got import $ from 'jquery';
just next to import mui...
and it works fine. What's more, if i create a new project and add
react-material-icons, the npm won't start, showing an error:
> myapp@0.1.0 start /Users/suvo/GitHub/myapp
> react-scripts start
sh: react-scripts: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! myapp@0.1.0 start: `react-scripts start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the myapp@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/suvo/.npm/_logs/2017-09-11T11_40_15_791Z-debug.log