Semantic-ui-react: Pagination addon missing on Semantic-UI-React version 0.77.2

Created on 10 Jan 2018  路  5Comments  路  Source: Semantic-Org/Semantic-UI-React

Steps

  • import {Pagination} from 'semantic-ui-react';
  • compile application

    Expected Result

Pagination addon is imported

Actual Result

Failed to compile.
'semantic-ui-react' does not contain an export named 'Pagination'

Version

0.77.2

invalid

Most helpful comment

@layershifter is correct. Also, I would recommend using yarn if you're not already as it solves many of these issues with NPM.

Just to double verify, unpkg'd is a CDN that pulls from NPM. Here, you can see the file is available on NPM:

https://unpkg.com/[email protected]/dist/commonjs/addons/Pagination/Pagination.js
https://unpkg.com/[email protected]/dist/es/addons/Pagination/Pagination.js

Best of luck!

All 5 comments

The component is included, there must be something else at play here:

https://codesandbox.io/s/2xpm2zzlnn

import React from 'react'
import { render } from 'react-dom'
import { Pagination } from 'semantic-ui-react'

const App = () => <Pagination />

render(<App />, document.getElementById('root'))

image

I still have this issue, I take two screenshots of my project, one is the 'semantic-ui-react' module in my project, the second one is my 'package.json' file.
I ran 'npm install' and no Pagination added into 'semantic-ui-react' module. Is there any other reason why Pagination not coming with the module?

Thanks

image
image

Remove your node_modules directory and make npm install again.

@layershifter is correct. Also, I would recommend using yarn if you're not already as it solves many of these issues with NPM.

Just to double verify, unpkg'd is a CDN that pulls from NPM. Here, you can see the file is available on NPM:

https://unpkg.com/[email protected]/dist/commonjs/addons/Pagination/Pagination.js
https://unpkg.com/[email protected]/dist/es/addons/Pagination/Pagination.js

Best of luck!

After I remove and rerun npm install, Pagination works.
Thanks for the help.

Was this page helpful?
0 / 5 - 0 ratings