Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

javascript - 无法在React应用中导入CSS模块(Unable to import CSS module in a react app)

I'm trying to import

(我正在尝试导入)

import '@progress/kendo-theme-material/dist/all.css'

but I get the following error:

(但我收到以下错误:)

Error in ./~/@progress/kendo-theme-material/dist/all.css
Module not found: Cannot resolve directory '.' in C:Userssmalakelworkother
eactmyapp
ode_modules@progresskendo-theme-materialdist

 @ ./~/css-loader?importLoaders=1!./~/postcss-loader!./~/@progress/kendo-theme-material/dist/all.css 6:447431-447444 6:447502-447515 

The project is created with npx create-react-react-app myapp and my node version is the 12 LTS

(该项目使用npx create-react-react-app myapp ,我的节点版本为12 LTS)

A strange thing is that the same demo app works on a Debian 9 System while there is an error in Windows 10

(奇怪的是,同一个演示应用程序可在Debian 9系统上运行,而Windows 10中存在错误)

  ask by Spiff translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...