Coder Social home page Coder Social logo

Comments (3)

jplhomer avatar jplhomer commented on July 17, 2024 1

For future reference: the way to solve this problem is to add the dependency causing the problem (e.g. react-router) to optimizeDeps.include inside vite.config.js.

from hydrogen-v1.

cathryngriffiths avatar cathryngriffiths commented on July 17, 2024

This is so weird. It's coming specifically from node_modules/mini-create-react-context/dist/esm/index.js on literally the first line in the file:

import React, { Component } from 'react';

If I change that to import React from 'react'; and change all references to Component to React.Component, then this specific error goes away but it leads to another related one: The requested module '/node_modules/prop-types/index.js' does not provide an export named 'default', which originates from line 4 in the node_modules/mini-create-react-context/dist/esm/index.js :

import PropTypes from 'prop-types';

Definitely something funky going on with dependencies, not just React dependencies πŸ€”

from hydrogen-v1.

jplhomer avatar jplhomer commented on July 17, 2024

super super strange! It's unfortunate that this error blocks the rest of the page, e.g. entry-client from loading and hydrating.

from hydrogen-v1.

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.