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.

Failed to compile

See original GitHub issue

@wojtekmaj great component! I like it a lot.

One small problem that it can’t compile. Using the import suggested on your docs the module cannot be found:

Module not found: Can't resolve '@wojtekmaj/react-datetimerange-picker' in ...

If I use:

import DateTimeRangePicker from '@wojtekmaj/react-datetimerange-picker/src/entry'

Then I get:

Module not found: Can't resolve './DateTimeRangePicker.css' in '/path/here/node_modules/@wojtekmaj/react-datetimerange-picker/src'

Edit:

Using the entry.nostyle version also fails to compile:

./node_modules/@wojtekmaj/react-datetimerange-picker/src/DateTimeRangePicker.jsx
Module parse failed: Unexpected token (30:8)
You may need an appropriate loader to handle this file type.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
sigrundiscommented, Jul 22, 2020

Same issue here except I’m using the react-daterange-picker version 3.0.0.

Global CSS cannot be imported from within node_modules.
Read more: https://err.sh/next.js/css-npm
Location: ../../node_modules/@wojtekmaj/react-daterange-picker/dist/entry.js

Using the react-calendar (version 3.1.0) works by importing the styles manually. Using that with selectRange prop and custom input in the meanwhile 😊

Developing next js project with versions: “next”: “^9.2.2”, “react”: “^16.8.6”,

4reactions
wojtekmajcommented, Apr 25, 2019

Oh! @taylorj91 You’re not using this package 😄 This is @wojtekmaj/react-datetimerange-picker, and you’re talking about react-datetime-range-picker 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack failed to compile - Stack Overflow
1 Answer 1 · inside index.js you are importing a css file and webpack is unable to handle it, this is what the...
Read more >
Why my React App Failed To Compile - Timonwa's Notes
Bugs and Errors will come in different shapes and sizes, styles and formats you never expect, causing your react app not to compile....
Read more >
Failed to compile error when running on dev server locally ...
After freshly run create-react-app demo cd ./demo npm start Then modify App.css. Console shows Failed to compile. Error in .
Read more >
Failed to compile. Module not found: Error: - Support
Having this error building a react (typescript) app. The error begins at timestamp 5:09:47 PM 5:09:05 PM: Build ready to start 5:09:07 PM: ......
Read more >
[XSIM 43-3410] Failed to compile one of the generated C files.
ERROR: [XSIM 43-3410] Failed to compile one of the generated C files. Hello,. I just tried to run a simple simulation but it...
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