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

Module not found #9451

Closed
IkshulDureja opened this issue Aug 7, 2020 · 14 comments
Closed

Module not found #9451

IkshulDureja opened this issue Aug 7, 2020 · 14 comments

Comments

@IkshulDureja
Copy link

Describe the bug

./src/Components/UserProfile.js
Module not found: Can't resolve './UserCard.js' in 'C:\Users\DELL\Desktop\photowall\src\Components'

Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys'
Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'

Did you try recovering your dependencies?

6.14.7

(Write your answer here.)

Which terms did you search for in User Guide?

npm chokidar

(Write your answer here if relevant.)

Environment

current version of create-react-app: 3.4.1

(paste the output of the command here.)

Steps to reproduce

(Write your steps here:)

1.I tried npm start on my terminal
2. I got this error
3. I think chokidar is trying to lock my module

Expected behavior

I think chokidar is trying to lock my module

(Write what you thought would happen.)

Actual behavior

(Write what happened. Please add screenshots!)

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

@judicaelandria
Copy link

Hey @IkshulDureja,
can you provide a screenshot of your code?

@IkshulDureja
Copy link
Author

image

@IkshulDureja
Copy link
Author

Here is the screenshot of my code.
Chokidar error shows up sometimes.

@judicaelandria
Copy link

that's because you don't have the component UserCard

@IkshulDureja
Copy link
Author

now localserver shows this
image

@judicaelandria
Copy link

try this thing
create a component UserCard in the same folder as your UserProfile
paste this code
carbon (1)

now you can use it
if this is not working can you post a codesandbox link so I can debug it ?

@IkshulDureja
Copy link
Author

image

image

What is codesandbox link?

@IkshulDureja
Copy link
Author

https://github.com/IkshulDureja/PhotoWall.git
Here is the github link if you can please help me out!!

@judicaelandria
Copy link

image

image

What is codesandbox link?

https://codesandbox.io/index2 online editor for react so I can debug it online

@judicaelandria
Copy link

Okay, I found the issue here,
the problem is you pass an HTML element as a prop because you can't do that,
you can only pass a String, Number, Array, Object
and if a component take a prop, don't forget to add a constructor
carbon (2)
carbon (3)
Hope it helps you?

@IkshulDureja
Copy link
Author

Sorry, I didn't get what you are trying to explain

@judicaelandria
Copy link

You can't pass an HTML element as a prop, you can only pass a string or number or array or object in prop

@stale
Copy link

stale bot commented Sep 7, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Sep 7, 2020
@stale
Copy link

stale bot commented Sep 12, 2020

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants