JedWatson / react-tappable

Tappable component for React

Home Page:http://jedwatson.github.io/react-tappable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find module 'react-dom'

snadon opened this issue · comments

I updated one of my project with the newest react 0.14.2 and got Error: Cannot find module 'react-dom'.

Here's my gulpfile file:

var gulp = require('gulp'),
    react = require('gulp-react'),
    concat = require('gulp-concat');

function compileJS() {
    gulp.src([
        'node_modules/react/dist/react.js',
        'node_modules/react-dom/dist/react-dom.js',
        'node_modules/react-tappable/dist/react-tappable.min.js',
    ])
    .pipe(concat('app.js'))
    .pipe(gulp.dest('dist'));
}

gulp.task('default', ['js']);

gulp.task('js', function() {
    compileJS();
});

package file:

{
  "name": "tappable issue",
  "devDependencies": {
    "gulp-concat": "^2.6.0",
    "gulp-react": "^3.1.0",
    "react": "^0.14.2",
    "react-dom": "^0.14.2",
    "react-tappable": "^0.7.1"
  }
}

and html file:

<html>
<head>
<script src="dist/app.js"></script>
</head>
<body>
    Tappable test...
</body>
</html>

React and ReactDOM are both available in the browser console.

same problem

do not use react-tappable.min.js

use react-tappable.js, it will have not problems

#66 fixes it for me.