Coder Social home page Coder Social logo

Comments (4)

matthewoden avatar matthewoden commented on May 18, 2024

I guess it'd help to point out where I got the issue:

Console:
Uncaught Error: Cannot find module "react-dom/lib/ReactDOM" ReactAddonsDOMDependencies.js:13

Source Map:

/**
 * Copyright 2013-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 */

'use strict';

var ReactDOM = require('react-dom/lib/ReactDOM'); // < -- this line right here errors out
var ReactInstanceMap = require('react-dom/lib/ReactInstanceMap');

exports.getReactDOM = function () {
  return ReactDOM;
};

exports.getReactInstanceMap = function () {
  return ReactInstanceMap;
};

if (process.env.NODE_ENV !== 'production') {
  var ReactPerf = require('react-dom/lib/ReactPerf');
  var ReactTestUtils = require('react-dom/lib/ReactTestUtils');

  exports.getReactPerf = function () {
    return ReactPerf;
  };

  exports.getReactTestUtils = function () {
    return ReactTestUtils;
  };
}


/*****************
 ** WEBPACK FOOTER
 ** ./~/react-stonecutter/~/react/lib/ReactAddonsDOMDependencies.js
 ** module id = 844
 ** module chunks = 0
 **/```

from react-stonecutter.

matthewoden avatar matthewoden commented on May 18, 2024

And just to clarify - no stonecutter code is at fault here. This is just a sad side effect of react messing with itself across versions. If a project has 15.3 dependancies and react 15.4 dependancies, while on npm 2.x (still common for those of us on Node LTS), require resolutions start going haywire.

from react-stonecutter.

dantrain avatar dantrain commented on May 18, 2024

Hi, I'd like to help but I'm a little confused. I've updated my react and react-dom packages to 15.4.0 and everything is working in the demo. If I change from ^15.3.2 to ~15.3.2 this will not allow using the latest version of react with stonecutter. Surely I don't want that?

Can you not fix the version of react in your project to 15.3.2, and this will still satisfy the stonecutter peer dependency? Sorry if I'm missing something.

from react-stonecutter.

matthewoden avatar matthewoden commented on May 18, 2024

So that's the weird thing - we DO use 15.3.2, and there's no peer dependency resolution happening. npm still installs stonecutter with react 15.4.0, and freaking out about missing /lib/ modules.

...Maybe I need to read a refresher on npm's dependency resolution.

And you're right - as a library, it'd actually be terrible to limit which react version you need. I suppose you could do some version patching to support react 15.3.X and react 15.4.X, but that's WAY more confusing for users than it is helpful.

For now, I suppose my best course of action is just forking stonecutter for our use until this 15.4 behavior stuff is resolved (or our apps all get up to speed with node 6 LTS, and we can use npm 3 for dependency management).

Thanks for the quick reply! I'll go ahead and close this.

from react-stonecutter.

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.