Cannot find module '@material-ui/core'

Asked
Active3 hr before
Viewed126 times

7 Answers

modulecannot
90%

Notice that contributions go far beyond pull requests and commits. Although we love giving you the opportunity to put your stamp on Material-UI, we also are thrilled to receive a variety of other contributions.,These great services sponsor Material-UI's core infrastructure:,npm i @material-ui/core

// with npm
npm install @material - ui / core

// with yarn
yarn add @material - ui / core
load more v
88%

Failed to compile Module not found: Can't resolve '@material-ui/core/Container',error Couldn't find package "@material-ui/core/Container" on the "npm" registry.,Cannot find module: '@material-ui/core/Container'. Make sure this package is installed. You can install this package by running: yarn add @material-ui/core/Container.

To upgrade, run the following:

$ yarn add @material - ui / core @next
72%

In order to use prebuilt SVG Material icons, such as those found in the icons demos you must first install the @material-ui/icons package:,In order to use the font Icon component, you must first add the Material icons font. Here are some instructions on how to do so. For instance, via Google Web Fonts:,Material-UI was designed with the Roboto font in mind. So be sure to follow these instructions. For instance, via Google Web Fonts:

To install and save in your package.json dependencies, run:

// with npm
npm install @material - ui / core

// with yarn
yarn add @material - ui / core
load more v
65%

Pretag
 Pretag team - issue, fix, solve, resolve
75%

I get: Uncaught Error: Cannot find module '@material-ui/icons/Label',Finally, useMediaQuery is a material-ui hook, so I recommend that you open an issue in their repository.,Solved: yarn add @material-ui/icons

// in src/Menu.js
import * as React from 'react';
import {
   createElement
} from 'react';
import {
   useSelector
} from 'react-redux';
import {
   useMediaQuery
} from '@material-ui/core';
import {
   MenuItemLink,
   getResources
} from 'react-admin';
import {
   withRouter
} from 'react-router-dom';
import LabelIcon from '@material-ui/icons/Label';
40%

I get: Uncaught Error: Cannot find module '@material-ui/icons/Label',Please fix the example, thank you., Ask questionsUncaught Error: Cannot find module '@material-ui/icons/Label'

When I try to create a menu like in the example:

// in src/Menu.js
import * as React from 'react';
import {
   createElement
} from 'react';
import {
   useSelector
} from 'react-redux';
import {
   useMediaQuery
} from '@material-ui/core';
import {
   MenuItemLink,
   getResources
} from 'react-admin';
import {
   withRouter
} from 'react-router-dom';
import LabelIcon from '@material-ui/icons/Label';
22%

You need to install Icons
Yarn add @material - ui / icons
npm install @material - ui / icons
load more v

Other "module-cannot" queries related to "Cannot find module '@material-ui/core'"