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.

antd-mobile does not contain an export

See original GitHub issue

Version

1.1.3

Environment

react (web browsers)

Reproduction link

https://codesandbox.io/s/013KDJPN

Steps to reproduce

  1. I’ve run npm install antd-mobile --save on a new project
  2. I’ve imported the following code:
import React, { Component } from 'react';
import { Button } from 'antd-mobile';

class HomePage extends Component {
  render() {
    return (
          <Button type="primary">test</Button>
    );
  }
}

export default HomePage;

What is expected?

That I see the antd-mobile elements

What is actually happening?

It cannot import elements from ‘antd-mobile’

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:24 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
mozillocommented, Jun 29, 2017

Same issue occurred when I executed “yarn build”

$ node scripts/build.js
Creating an optimized production build...
Failed to compile.

./src/mobile/callback.js
80:28-38 'antd-mobile' does not contain an export named 'WhiteSpace'.

error Command failed with exit code 1.
1reaction
paranoidjkcommented, May 24, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Attempted import error: 'Icon' is not exported from 'antd'
On upgrading the version of Ant Design to v4, one of the major breaking changes have been that Icon is no longer exported...
Read more >
FAQ - Ant Design
Here are the frequently asked questions about Ant Design and antd that you should look up before you ask in the community or...
Read more >
Result - Ant Design
Use when important operations need to inform the user to process the results and the feedback is more complicated. Examples.
Read more >
Getting Started - Ant Design
Import on Demand ... antd supports tree shaking of ES modules, so using import { Button } from 'antd'; would drop js code...
Read more >
Use in create-react-app - Ant Design
Below is the default directory structure. ... Now we install antd from yarn or npm. ... Modify src/App.js , import Button component from...
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