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.

Error: Cannot find module './Spinner' from 'index.js'

See original GitHub issue

https://github.com/xinthink/react-native-material-kit/blob/master/lib/mdl/index.js#L9

Spinner.js does not existed,

The existing ones are Spinner.android.js or Spinner.ios.js

Is this on purpose?

Running test reporting:

 - Error: Cannot find module './Spinner' from 'index.js'
       at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:151:17)
       at Object.<anonymous> (node_modules/react-native-material-kit/lib/mdl/index.js:9:17)
       at Object.<anonymous> (node_modules/react-native-material-kit/lib/index.js:10:10)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
Winangelcommented, Aug 3, 2016

I face the same problem here.

@lakeoffaith I understand that rn can require the right file when running but I can’t get this to work in my tests though as babel try to load a Spinner.js file and not a Spinner.ios.js file…

As I do not specifically need the spinner in my code I’m now requiring the desired components (here the MKButton) through:

import * as MKButton from '../../node_modules/react-native-material-kit/lib/mdl/Button';

So that I don’t have to import the spinner as well but this is:

  1. very ugly IMO
  2. won’t solve the issue if I need to require the Spinner some day 😦
0reactions
picodothcommented, Jun 4, 2018

outdated, closing

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am getting error while implementing ngx-Spinner 8.0.3
First: When you got this error, first you need to remove the ... Second: Remove your Node Module folder and use the command...
Read more >
Fix error: cannot find module 'x' in Node.js or 'express'
A quick fix to the error-cannot find module is to try and install all the presented module in your terminal correctly. Navigate to...
Read more >
ora - npm
Text or a function that returns text to display before the spinner. No prefix text will be displayed if set to an empty...
Read more >
spin.js
A highly configurable JavaScript/CSS spinner that can be used as a resolution-independent loading indicator.
Read more >
Spinners | Android Developers
Touching the spinner displays a dropdown menu with all other ... You should usually do so in your XML layout with a <Spinner>...
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