Uncaught Error: Cannot find module 'cloudinary-react/lib/components/CloudinaryContext' from 'cloudinary-react/lib/index.js'
See original GitHub issueThis is my code
import React from 'react';
import {Image, CloudinaryContext, Transformation} from 'cloudinary-react';
class ImageUpload extends React.Component {
render() {
return(
<div>
<h1>Hello, world!</h1>
<Image cloudName="demo" publicId="sample" width="300" crop="scale"/>
</div>
);
}
}
export default ImageUpload;
In the console:
Uncaught Error: Cannot find module 'cloudinary-react/lib/components/CloudinaryContext' from 'cloudinary-react/lib/index.js'
But the folder Exists (I’m installed via npm)
What is the problem?
Thanks
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How do I resolve "Cannot find module" error using Node.js?
Using npm install installs the module into the current directory only (in a subdirectory called node_modules ). Is app.js located under ...
Read more >Uncaught Error: Cannot find module "." · Issue #4921 - GitHub
What is the current behavior? Below exception: polyfills.js:1 Error: Cannot find module "." at webpackMissingModule (eval at 148 (http:// ...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
In my case, I got it like this "Module not found: Error: Can't resolve 'react-icons/fa' in 'C:\Users\user\Desktop\Projects\Address Locator\ ...
Read more >How to resolve "Cannot find module" error in Node - Sabe.io
When you are working in Node, you will sometimes encounter the error Cannot find module 'module-name' with the error code MODULE_NOT_FOUND .
Read more >Fix a CloudWatch canary that's failing with the error "Cannot ...
zip file of your function and dependencies, then you receive an error. The error message reads: Cannot find module '/opt/nodejs/node_modules/ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@hmontes It is definitely brunch.io, it works fine out of the box with Webpack.
Brunch are not using standard NPM package lookups, and loads all modules with their resolved name, e.g. it caches
cloudinary-react/lib/components/CloudinaryComponent/CloudinaryComponent.js
However our code is using the module folders as modules pattern, so it requires
cloudinary-react/lib/components/CloudinaryComponent
which cannot be resolved by Brunch.Nevertheless, you can overcome this issue by aliasing Cloudinary’s files in your
brunch-config.js
by adding:@hmontes Where did you see that error? What was the command you were running?