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

Error "Unable to resolve path" when trying to use the package #7

Closed
emmyhayer opened this issue Jul 25, 2018 · 4 comments
Closed

Error "Unable to resolve path" when trying to use the package #7

emmyhayer opened this issue Jul 25, 2018 · 4 comments
Assignees
Milestone

Comments

@emmyhayer
Copy link

emmyhayer commented Jul 25, 2018

./src/components/organismes/AddItemForm/AddItemForm.js
Line 5: Unable to resolve path to module 'react-daterange-picker' import/no-unresolved

i installed both yarn and npm but getting this error..but package is showing in node_modules folder

i tried this on two projects, getting same error

@wojtekmaj
Copy link
Owner

Hello,
React-DateRange-Picker is not on npm due to name conflict. You need to build it yourself if you would like to use it.

@cryptoclimate
Copy link

cryptoclimate commented Aug 15, 2018

I tried to build it but am getting this error (node v10.5.0):

$ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 46068 packages in 4.063s
found 4 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
$ npm run build

> react-daterange-picker@1.0.0 build node_modules/react-daterange-picker
> yarn run build-js && yarn run copy-styles && yarn run build-styles

yarn run v1.9.4
$ babel src -d dist --ignore __tests__
SyntaxError: src/DateRangePicker.jsx: Unexpected token (22:8)
  20 |   }
  21 | 
> 22 |   state = {};
     |         ^
  23 | 
  24 |   componentDidMount() {
  25 |     document.addEventListener('mousedown', this.onClick);
error Command failed with exit code 1.

@wojtekmaj
Copy link
Owner

Uh... I may release it under @wojtekmaj/react-daterange-picker ;) I think that would settle it.

@wojtekmaj
Copy link
Owner

@cryptoclimate @emmyhayer The package is now published as a scoped package under @wojtekmaj/react-daterange-picker name. Please check it out; it comes with prebuilt code, so you shouldn't have any more problems with it!

@wojtekmaj wojtekmaj changed the title unalbe to resolve path Error "Unalbe to resolve path" when trying to use the package Aug 17, 2018
@wojtekmaj wojtekmaj self-assigned this Aug 17, 2018
@wojtekmaj wojtekmaj changed the title Error "Unalbe to resolve path" when trying to use the package Error "Unable to resolve path" when trying to use the package Aug 17, 2018
@wojtekmaj wojtekmaj added this to the 1.0.0 milestone Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants