简体   繁体   中英

Can't resolve radium

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

在此处输入图片说明

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

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

npm install

and everything is working fine.

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.

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'
npm install --save radium --force

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM