olahol / reactpack

:package: build your react apps with one command and one `npm i`.
982 stars 36 forks source link

Example doesn't work #1

Closed markomarkovic closed 8 years ago

markomarkovic commented 8 years ago

Following the example gives me this result:


 Errors:
   ./src/index.js
   Module not found: Error: Cannot resolve module 'react' in /tmp/reactpack-test/src
   resolve module react in /tmp/reactpack-test/src
     looking for modules in /tmp/reactpack-test/node_modules
       /tmp/reactpack-test/node_modules/react doesn't exist (module as directory)
       resolve 'file' react in /tmp/reactpack-test/node_modules
         resolve file
           /tmp/reactpack-test/node_modules/react doesn't exist
           /tmp/reactpack-test/node_modules/react.webpack.js doesn't exist
           /tmp/reactpack-test/node_modules/react.web.js doesn't exist
           /tmp/reactpack-test/node_modules/react.js doesn't exist
           /tmp/reactpack-test/node_modules/react.json doesn't exist
   [/tmp/reactpack-test/node_modules/react]
   [/tmp/reactpack-test/node_modules/react]
   [/tmp/reactpack-test/node_modules/react.webpack.js]
   [/tmp/reactpack-test/node_modules/react.web.js]
   [/tmp/reactpack-test/node_modules/react.js]
   [/tmp/reactpack-test/node_modules/react.json]
    @ ./src/index.js 5:13-29

   ./src/index.js
   Module not found: Error: Cannot resolve module 'react-dom' in /tmp/reactpack-test/src
   resolve module react-dom in /tmp/reactpack-test/src
     looking for modules in /tmp/reactpack-test/node_modules
       /tmp/reactpack-test/node_modules/react-dom doesn't exist (module as directory)
       resolve 'file' react-dom in /tmp/reactpack-test/node_modules
         resolve file
           /tmp/reactpack-test/node_modules/react-dom doesn't exist
           /tmp/reactpack-test/node_modules/react-dom.webpack.js doesn't exist
           /tmp/reactpack-test/node_modules/react-dom.web.js doesn't exist
           /tmp/reactpack-test/node_modules/react-dom.js doesn't exist
           /tmp/reactpack-test/node_modules/react-dom.json doesn't exist
   [/tmp/reactpack-test/node_modules/react-dom]
   [/tmp/reactpack-test/node_modules/react-dom]
   [/tmp/reactpack-test/node_modules/react-dom.webpack.js]
   [/tmp/reactpack-test/node_modules/react-dom.web.js]
   [/tmp/reactpack-test/node_modules/react-dom.js]
   [/tmp/reactpack-test/node_modules/react-dom.json]
    @ ./src/index.js 9:16-36

   ./src/index.js
   Module not found: Error: Cannot resolve module 'bootstrap/dist/css/bootstrap.css' in /tmp/reactpack-test/src
   resolve module bootstrap/dist/css/bootstrap.css in /tmp/reactpack-test/src
     looking for modules in /tmp/reactpack-test/node_modules
       /tmp/reactpack-test/node_modules/bootstrap doesn't exist (module as directory)
   [/tmp/reactpack-test/node_modules/bootstrap]
    @ ./src/index.js 19:0-43

 Files:
   dist/bundle.js (4.19 KB)
   dist/bundle.js.map (1.93 KB)
   dist/index.html (266 B)

npm 3.9.3 node 4.4.5

It starts to work after manually adding react and react-dom and bootstrap. I've expected based on the name that at least react is already included.

olahol commented 8 years ago

It only includes building, not front end dependencies, this is so people can switch out React for lightweight alternatives like Preact if they want to.

olahol commented 8 years ago

I have added a package.json fragment in the README to make this more clear now.