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

react-clock/dist/Clock.css could not be found within the project or in these directories: node_modules #125

Closed
coling-git opened this issue Aug 12, 2021 · 4 comments
Labels
question Further information is requested stale

Comments

@coling-git
Copy link

coling-git commented Aug 12, 2021

I am trying to add a TimePicker to my app and all I did was follow these three steps:

  1. Install by executing npm install react-time-picker
  2. Import by adding import TimePicker from 'react-time-picker'.
  3. Use by adding <TimePicker /. Use onChange prop for getting new values.

The code crashes (on Android and iOS) at the "import TimePicker from 'react-time-picker'" with the error message:

error: Error: Unable to resolve module react-clock/dist/Clock.css from ./node_modules/react-time-picker/dist/entry.js: react-clock/dist/Clock.css could not be found within the project or in these directories:
node_modules

I checked and both of the files entry.js and Clock.css are in the correct places: node_modules/react-time-picker/dist/entry.js and node_modules/react-clock/dist/Clock.css

What could be causing this error??

@wojtekmaj
Copy link
Owner

What are you using to bundle your app? Can you share the config?

@wojtekmaj wojtekmaj added the question Further information is requested label Aug 13, 2021
@ivdma
Copy link

ivdma commented Sep 8, 2021

The same issue happened to us in the (private) component library running Styleguidist (on Webpack).
To us, the fix was to add react-clock to the CSS resolve rule. Something similar to this:

module.exports = {
  module: {
    rules: [
      // ...
      {
        test: /\.css$/,
        include: [
          // ...
          path.resolve(__dirname, 'node_modules/react-clock'),
          // ...
        ],
        // ...
      },
    },
  },
},

@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

@github-actions github-actions bot added the stale label Dec 13, 2021
@github-actions
Copy link
Contributor

This issue was closed because it has been stalled for 14 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested stale
Projects
None yet
Development

No branches or pull requests

3 participants