Coder Social home page Coder Social logo

ERROR in ./~/react-html-email/lib/injectReactEmailAttributes.js Module not found: Error: Cannot resolve module 'react/lib/DOMProperty' about react-html-email HOT 14 CLOSED

chromakode avatar chromakode commented on July 28, 2024
ERROR in ./~/react-html-email/lib/injectReactEmailAttributes.js Module not found: Error: Cannot resolve module 'react/lib/DOMProperty'

from react-html-email.

Comments (14)

JuanchiRios avatar JuanchiRios commented on July 28, 2024 6

I had the same problem. setting an alias on webpack.config.js like @wagnermoschini solve the problem

module.exports = {
    ...
    resolve: {
        alias: {
            "react/lib/DOMProperty": "react-dom/lib/DOMProperty"
        }
    }
};

from react-html-email.

Poky85 avatar Poky85 commented on July 28, 2024 5

In Webpack you can use this webpack.config.js as hotfix

var config = {
	resolve: {
		alias: {
			"react/lib/DOMProperty": "react-dom/lib/DOMProperty"
		}
	}
};

export default config;

from react-html-email.

wagnermoschini avatar wagnermoschini commented on July 28, 2024 2

I had the same problem, setting an alias on webpack.config.js works fine!

from react-html-email.

ColeTownsend avatar ColeTownsend commented on July 28, 2024 1

Thumbs up – looks like this used some private API stuff in react which now exists in react-dom. However, it appears to look for react-dom first and check for the api.

require('react-dom');

// ensure base DOM properties are already injected

// FIXME: implement without relying on unstable import locations
var DOMProperty = undefined;
try {
  exports._DOMProperty = DOMProperty = require('react-dom/lib/DOMProperty');
} catch (e) {
  exports._DOMProperty = DOMProperty = require('react/lib/DOMProperty');
}

from react-html-email.

Batistleman avatar Batistleman commented on July 28, 2024 1

Seems like this could be pull requested from: https://github.com/gabriprat/react-html-email

from react-html-email.

chromakode avatar chromakode commented on July 28, 2024 1

Just released v2.0.0 which drops support for older versions of React and should no longer have this issue.

from react-html-email.

mfeuermann avatar mfeuermann commented on July 28, 2024

I have same issue on different project. After update i have same issue. I also never change to code...
Im using "react-dom": "^15.0.0", "react-html-email": "^1.1.3", "react": "^15.0.0"

from react-html-email.

patrickpoh avatar patrickpoh commented on July 28, 2024

@mfeuermann hi 5 man. However the code still works though

from react-html-email.

mfeuermann avatar mfeuermann commented on July 28, 2024

Yes but im using Meteor.js and there is problem with building of application with this kind of warning message...

from react-html-email.

Zaiban avatar Zaiban commented on July 28, 2024

I'm having this too, also using Meteor.js.

from react-html-email.

Luksys5 avatar Luksys5 commented on July 28, 2024

Same here. Can't build project, although I don't use Meteor
using:
react and react-dom 15.4.0
babel-preset-react 6.16.0
babel-core 6.18.2
babel-loader-6.2.8
webpack 1.13.3
webpack-dev-server 1.16.2
and other less important stuff...

from react-html-email.

patrickpoh avatar patrickpoh commented on July 28, 2024

basically what is happening is because React 15.4.0 removed ReactInjection.js file. Hence this library broke

from react-html-email.

intermundos avatar intermundos commented on July 28, 2024

Webpack alias works! Thank you.

from react-html-email.

chromakode avatar chromakode commented on July 28, 2024

Hi all, I am working on a fix to this issue. The require('react/lib/DOMProperty') exists to support versions of React prior to 15.4.0. I did not anticipate this library would be built by a bundler such as webpack, which will attempt to resolve and bundle both modules. In the mean time, I think the webpack alias shared by @Poky85 should work.

from react-html-email.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.