Browser version requires missing files.
See original GitHub issueExpected Behavior
Using the browser version of JIMP, e.g. when running Browserify on a Node.JS package that requires JIMP, should be clean, as it should contain all of the JIMP code in a single file.
Current Behavior
Browserify (most likely the browser too, if you use the browser version directly in the browser) will error due to erroneous calls to require()
.
Failure Information (for bugs)
The error complains about ./src/converter
, which simply doesn’t exist in jimp/browser
(where jimp
is the node_modules
subfolder where jimp
is installed, when installed from npm
).
Steps to Reproduce
I haven’t tried to use JIMP directly in the browser, but here’s how to reproduce this error the way I noticed it.
- Create a simple Node.JS project.
- Install JIMP as a dependency (
npm i --save jimp
). - Create an
index.js
file with the following contents:
const JIMP = require('jimp');
- Run
browserify index.js
.
Context
- Jimp Version: JIMP 0.6.0.
- Operating System: Linux Mint 19 “Tara” (Ubuntu fork), kernel Linux v4.20.
- Node version: Node.JS v8.10.0.
Failure Logs
> nodemips@0.1.1 build /home/gustavo6046/Source code/nodemips
> browserify -r ./index.js:mips | babel --minified -f minif.tmp | uglifyjs >browser/mips.js
Error: Cannot find module './src/converter' from '/home/gustavo6046/Source code/nodemips/node_modules/jimp/browser/lib'
at /home/gustavo6046/Source code/nodemips/node_modules/browser-resolve/node_modules/resolve/lib/async.js:55:21
at load (/home/gustavo6046/Source code/nodemips/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43)
at onex (/home/gustavo6046/Source code/nodemips/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31)
at /home/gustavo6046/Source code/nodemips/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:152:21)
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
All files missing, including media files, document files and ...
2. Go to C:\Windows.Old folder and look for your files here. These folders will be hidden, so you need to make it visible...
Read more >missing files error - Adobe Support Community - 9234086
Solved: With newest Muse update I keep getting this error when published "Some files on the server may be missing or incorrect. Clear...
Read more >Fix file download errors - Google Chrome Help
This error means that there's not enough space on your computer to download the file. To fix the error: Delete some files from...
Read more >How to Solve The HTML5 Video 'File Not Found' Error?
Hi Francesca, This error 224003 is a online video playback error. May be your browser doesn't support the IMDB video file type. Ensure...
Read more >Why is my song telling me that there are missing files?
You may have inadvertently deleted the files during system cleanup or something similar. (if searching, search the system trash as well); The files...
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
I can do it if you want me to. It’ll be quick and simple enough.
Either way, maybe it would be a good idea to assign someone to do the job, to avoid concurrent pull requests trying to do the same thing.
I’m pretty sure it would be better to leave it to the user, unless JIMP relies on features that don’t work in the browser.