react-tappable icon indicating copy to clipboard operation
react-tappable copied to clipboard

Cannot find module 'react-dom'

Open snadon opened this issue 11 years ago • 4 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.

snadon avatar Nov 17 '15 11:11 snadon

same problem

mishk0 avatar Dec 15 '15 15:12 mishk0

do not use react-tappable.min.js

zhengyange avatar Feb 04 '16 09:02 zhengyange

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

zhengyange avatar Feb 04 '16 09:02 zhengyange

#66 fixes it for me.

snadon avatar Feb 09 '16 19:02 snadon