Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues importing Accordion component #3712

Closed
pietrop opened this issue Apr 26, 2019 · 7 comments

Comments

@pietrop
Copy link

commented Apr 26, 2019

Thanks for the great repo!

I am having some issues importing the Accordion component

import Accordion from 'react-bootstrap/Accordion';

Error message

./src/Components/Transcripts/TranscriptAnnotate/index.js
Module not found: Can't resolve 'react-bootstrap/Accordion' in '/Users/passap02/digital-paper-edit/packages/client/src/Components/Transcripts/TranscriptAnnotate'

Or

import { Accordion } from 'react-bootstrap';

Error message

./src/Components/Transcripts/TranscriptAnnotate/index.js
Attempted import error: 'Accordion' is not exported from 'react-bootstrap'.

Couldn't find any other mentions in the other issues, but maybe I missed something?

@mxschmitt

This comment has been minimized.

Copy link
Member

commented Apr 26, 2019

Which version of react-bootstrap are you using?

@pietrop

This comment has been minimized.

Copy link
Author

commented Apr 26, 2019

I am on "react-bootstrap": "^1.0.0-beta.5",

@jquense

This comment has been minimized.

Copy link
Member

commented Apr 26, 2019

I think beta.6 is the earliest with the accordion in it

@pietrop

This comment has been minimized.

Copy link
Author

commented Apr 26, 2019

Thanks, will try installing six,

I just tried installing the latest, 8 but couldn't get passed installation

$ npm install react-bootstrap@1.0.0-beta.8
npm ERR! Unexpected end of JSON input while parsing near '...oader":"^0.12.0","tra'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/passap02/.npm/_logs/2019-04-26T19_12_36_159Z-debug.log

and then in /.npm/_logs/2019-04-26T19_12_36_159Z-debug.log logs I get

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   'react-bootstrap@1.0.0-beta.8' ]
2 info using npm@6.7.0
3 info using node@v10.0.0
4 verbose npm-session 9e7271eeb8a82c5d
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://registry.npmjs.org/react-bootstrap 16ms (from cache)
8 silly fetchPackageMetaData error for react-bootstrap@1.0.0-beta.8 Unexpected end of JSON input while parsing near '...oader":"^0.12.0","tra'
9 timing stage:rollbackFailedOptional Completed in 1ms
10 timing stage:runTopLevelLifecycles Completed in 2084ms
11 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...oader":"^0.12.0","tra'
11 verbose stack     at JSON.parse (<anonymous>)
11 verbose stack     at parseJson (/usr/local/lib/node_modules/npm/node_modules/json-parse-better-errors/index.js:7:17)
11 verbose stack     at consumeBody.call.then.buffer (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:96:50)
11 verbose stack     at process._tickCallback (internal/process/next_tick.js:178:7)
12 verbose cwd /Users/passap02/digital-paper-edit/packages/client
13 verbose Darwin 17.7.0
14 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "react-bootstrap@1.0.0-beta.8"
15 verbose node v10.0.0
16 verbose npm  v6.7.0
17 error Unexpected end of JSON input while parsing near '...oader":"^0.12.0","tra'
18 verbose exit [ 1, true ]
@pietrop

This comment has been minimized.

Copy link
Author

commented Apr 26, 2019

I get same issue with react-bootstrap@1.0.0-beta.6

@taion

This comment has been minimized.

Copy link
Member

commented Apr 26, 2019

That looks like a transient issue on your end. Try wiping your cache and ensuring that you don't have any sort of proxy there.

@pietrop

This comment has been minimized.

Copy link
Author

commented Apr 27, 2019

Thanks for the heads up, I found this comment npm/npm#19072 (comment) and
npm cache clean --force did the trick, and was able to to try Accordion in "react-bootstrap": "^1.0.0-beta.8", so closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.