Can't resolve radium

4.6k views Asked by At

I am new to React Environment, and was going through a tutorial and tried to install Radium for css pseudo behaviour using visual integrated terminal.

npm i --save radium

the radium has been installed and added to the package.json

enter image description here

but after making changes and saving compilation has been failed and throwing the following error.

Module not found: Can't resolve './../../webpack/buildin/global.js' in 'D:\maximillian-react\react-complete-guide\node_modules\radium\es'

What went wrong?

and Thanks in advance

4

There are 4 answers

0
Aman Kumar On BEST ANSWER

Oh, It's really bad but I found what went wrong, I just installed the dependencies using

npm install

and everything is working fine.

0
Masood On

After installing Radium stop your React development server ctrl+c and then run:

yarn start

or

npm start

If necessary, before restarting development server run:

npm install

as well and that will fix any missing dependencies.

0
Sajjan Shah On

check the syntax for your import for importing radium in respective components the correct syntax I have attached in the code snippets . please do check

import Radium from 'radium'
1
Md. Imrul Kayes On
npm install --save radium --force