JedWatson / react-tappable

Tappable component for React
http://jedwatson.github.io/react-tappable/
MIT License
862 stars 90 forks source link

Cannot find module 'react-dom' #63

Closed snadon closed 8 years ago

snadon commented 8 years ago

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.

mishk0 commented 8 years ago

same problem

zhengyange commented 8 years ago

do not use react-tappable.min.js

zhengyange commented 8 years ago

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

snadon commented 8 years ago

66 fixes it for me.