reapp / starter-default

Base scaffold when running `reapp new` www.reapp.io
5 stars 7 forks source link

Missing npm modules with reapp new <app> #6

Open anttiviljami opened 8 years ago

anttiviljami commented 8 years ago

After succesfully running reapp new, running a reapp run gives me these errors:

ERROR in multi main
Module not found: Error: Cannot resolve module 'webpack-dev-server/client' in /Users/antti/sugar-tracker
 @ multi main

ERROR in multi main
Module not found: Error: Cannot resolve module 'webpack/hot/only-dev-server' in /Users/antti/sugar-tracker
 @ multi main

ERROR in multi main
Module not found: Error: Cannot resolve module 'babel-loader' in /Users/antti/sugar-tracker
 @ multi main
anttiviljami commented 8 years ago

After installing the missing modules with

npm install --save webpack webpack-dev-server babel babel-core babel-loader

I get the following error:

ERROR in ./app/app.js
Module build failed: ReferenceError: [BABEL] /Users/antti/sugar-tracker/app/app.js: Using removed Babel 5 option: base.stage - Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets
    at Logger.error (/Users/antti/sugar-tracker/node_modules/babel-core/lib/transformation/file/logger.js:39:11)
    at OptionManager.mergeOptions (/Users/antti/sugar-tracker/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:20)
    at OptionManager.init (/Users/antti/sugar-tracker/node_modules/babel-core/lib/transformation/file/options/option-manager.js:465:10)
    at File.initOptions (/Users/antti/sugar-tracker/node_modules/babel-core/lib/transformation/file/index.js:194:75)
    at new File (/Users/antti/sugar-tracker/node_modules/babel-core/lib/transformation/file/index.js:123:22)
    at Pipeline.transform (/Users/antti/sugar-tracker/node_modules/babel-core/lib/transformation/pipeline.js:45:16)
    at transpile (/Users/antti/sugar-tracker/node_modules/babel-loader/index.js:14:22)
    at Object.module.exports (/Users/antti/sugar-tracker/node_modules/babel-loader/index.js:88:12)
 @ multi main
govardhanaraoganji commented 8 years ago

Am also getting the same error, after installing node modules like

npm install --save webpack webpack-dev-server babel-loader

Here is the log,

ERROR in ./app/app.js
Module build failed: ReferenceError: [BABEL] /home/govardhan/Vardhan/NodeJsWork/React_JS/ReactApp/app/app.js: Using removed Babel 5 option: base.stage - Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets
    at Logger.error (/home/govardhan/Vardhan/NodeJsWork/React_JS/ReactApp/node_modules/babel-core/lib/transformation/file/logger.js:41:11)
    at OptionManager.mergeOptions (/home/govardhan/Vardhan/NodeJsWork/React_JS/ReactApp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:288:20)
    at OptionManager.init (/home/govardhan/Vardhan/NodeJsWork/React_JS/ReactApp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:488:10)
    at File.initOptions (/home/govardhan/Vardhan/NodeJsWork/React_JS/ReactApp/node_modules/babel-core/lib/transformation/file/index.js:223:65)
    at new File (/home/govardhan/Vardhan/NodeJsWork/React_JS/ReactApp/node_modules/babel-core/lib/transformation/file/index.js:140:24)
    at Pipeline.transform (/home/govardhan/Vardhan/NodeJsWork/React_JS/ReactApp/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/home/govardhan/Vardhan/NodeJsWork/React_JS/ReactApp/node_modules/babel-loader/index.js:14:22)
    at Object.module.exports (/home/govardhan/Vardhan/NodeJsWork/React_JS/ReactApp/node_modules/babel-loader/index.js:88:12)
 @ multi main
govardhanaraoganji commented 8 years ago

Hi @anttiviljami , I executed the below steps then only application was started.

Here is the steps,

  1. npm install -g reapp
  2. reapp new [AppName]
  3. made chnage on package.json > "start": "reapp run -d"
  4. added npm modules like I. react-addons-transition-group@^15.1.0 II. react-addons-update@^15.1.0 III. reapp-ui@^0.12.85 IV. recompose@^0.20.2
  5. added npm module on global sudo npm install webpack --global
  6. Updated the following code on reapp-ui/components/Typeahead.js line no 11, 12, 13 & 14
var searchIcon = require('../assets/icons/search.svg');
var micIcon = require('../assets/icons/mic3.svg');
var closeIcon = require('../assets/icons/material-close.svg');
var leftIcon = require('../assets/icons/material-left.svg');

and finally, last but not least

  1. default we are getting babel 6XX but we need npm install babel@5.4.0 babel-core@5.4.0 babel-loader@5.4.0 --save

3rd, 6th and 7th are important.

webjoaoneto commented 8 years ago

The follow package.json works for me:

{
  "author": "Your APp here",
  "name": "yourappname",
  "repository": "",
  "description": "",
  "version": "1.0.0",
  "main": "./app/app.js",
  "reapp": "0.8",
  "scripts": {
    "test": "",
    "start": "reapp run -d"
  },
  "dependencies": {
    "autoprefixer-loader": "^3.2.0",
    "babel": "5.4.0",
    "babel-core": "5.4.0",
    "babel-loader": "5.4.0",
    "css-loader": "^0.23.1",
    "raw-loader": "^0.5.1",
    "react": "15.1.x",
    "react-addons-transition-group": "^15.1.0",
    "react-addons-update": "^15.1.0",
    "react-dom": "^15.1.0",
    "react-hot-loader": "^1.3.0",
    "reapp-kit": "^1.2.0",
    "recompose": "^0.20.2",
    "style-loader": "^0.13.1",
    "webpack": "^1.13.1",
    "webpack-dev-server": "^1.14.1"
  }
}

Consider too do the step 6 (change icons PATH) from the @govardhanraoganji above

govardhanaraoganji commented 8 years ago

Step 6 is important @joao-gsneto. please add your comments on below link