question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version of antd-mobile

5.0.0-beta.23

Operating system and its version

Others

Browser and its version

chrome

Sandbox to reproduce

No response

What happened?

“next”: “10.2.0”, “next-pwa”: “^5.2.23”, “webpack”: “^4.46.0”, “react”: “17.0.2”, 安装2.x正常,升级5.0.0-beta.23之后import { Swiper } from 'antd-mobile’报错slider.css loader问题,不知道怎么解决

辛苦解答,感谢

Relevant log output

error - ./node_modules/antd-mobile/es/components/slider/slider.css
ModuleParseError: Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

Code of Conduct

  • I agree to follow this project’s Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
zzzgydicommented, Nov 9, 2021

你这里的next版本是v10,对应的next-transpile-modules版本应该是v7,你现在用的是v9,具体可以看https://github.com/martpie/next-transpile-modules#compatibility-table

0reactions
ZhelinChengcommented, Nov 16, 2021

我出现了这样的提示: next-transpile-modules - DEPRECATED - fallbacking to previous module resolution system for module “antd-mobile”, you can now just pass the name of the package to transpile and it will detect its real path without you having to pass a sub-module.

Error: next-transpile-modules - an unexpected error happened when trying to resolve “antd-mobile”. Are you sure the name module you are trying to transpile is correct, and it has a “main” or an “exports” field?

Error: Can’t resolve ‘antd-mobile’ in ‘/var/user’

at getPackageRootDirectory (/opt/node_modules/next-transpile-modules/src/next-transpile-modules.js:173:17)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)

at Module.load (internal/modules/cjs/loader.js:1002:32)

at Function.Module._load (internal/modules/cjs/loader.js:901:14)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Nextant Aerospace: Home
The Nextant 400XTi is a completely rebuilt Beechjet 400A/XP with Williams FJ44-3AP engines and the Rockwell Collins Pro Line 21 integrated avionics suite....
Read more >
Nextant - Constant Aviation
Nextant Authorized Service Facility · A-D Inspections · Gear overhaul capabilities · Complete avionics service and installation · In-house engineering support staff ...
Read more >
Nextant 400XT Business Jet - Aerospace Technology
The Nextant 400XT is a single-engine light business jet designed and manufactured by US-based Nextant Aerospace to operate on domestic and international air ......
Read more >
Nextant Aerospace - Wikipedia
Nextant Aerospace is a United States-based company specializing in the remanufacturing of ... LED lighting and Internet and satellite phone access.
Read more >
Nextant Aerospace - Home | Facebook
#NextantAerospace provides expert #NDT services in the eddy current, ultrasonic, magnetic particle, and liquid penetrant non-destructive testing (#NDT) methods.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found