Giter VIP home page Giter VIP logo

colibrijs's Introduction

Colibrijs (demo)

Colibrijs is a small library that can extract the dominant colors from any image.

The algorithm used in the library has been ported over from the following StackOverflow answer.

Examples

Installation

$> npm install colibrijs

Usage

Node:

let fs = require('fs');

let Colibri = require('colibrijs');
let Image = require('canvas').Image;

let img = new Image();
img.src = fs.readFileSync('myImage.jpg');

console.log(Colibri.extractImageColors(img, 'css'));

Browser:

let img = new Image();
img.src = 'myImage.jpg';

img.addEventListener('load', function () {
    alert(Colibri.extractImageColors(img, 'css'));
});

Note that it won't work as expected if you try to load a remote image subject to cross-origin restrictions. However, if the target host is properly configured (and if you're not using IE), you should be able to do the following :

let img = new Image();

img.crossOrigin = 'Anonymous';
img.src = 'http://i.imgur.com/OUmDIOqb.jpg';

img.addEventListener('load', function () {
    alert(Colibri.extractImageColors(img, 'css'));
});

Performances

  • Performance issues might arise if you try to extract dominant colors from a lot of images (dozen of them). If you happen to hit this issue, maybe generating these colors the server side might be a better.

  • Since we're iterating on every pixel of the images, large ones might take a long time to complete. In order to avoid this issue, try to only extract colors from small images. If necessary, you can resize them at runtime before giving them to Colibrijs:

    let img = new Image();
    
    img.crossOrigin = 'Anonymous';
    img.src = 'http://i.imgur.com/OUmDIOq.jpg';
    
    img.addEventListener('load', function () {
    
        var canvas = document.createElement( 'canvas' );
        var context = canvas.getContext( '2d' );
    
        var maxWidth = 200, maxHeight = 200;
        var widthRatio = Math.max( 1, img.width / maxWidth );
        var heightRatio = Math.max( 1, img.height / maxHeight );
        var maxRatio = Math.max( widthRatio, heightRatio );
    
        canvas.width = img.width / maxRatio;
        canvas.height = img.height / maxRatio;
    
        context.drawImage( img, 0, 0, canvas.width, canvas.height );
    
        alert( Colibri.extractImageColors( canvas, 'css' ) );
    
    });

License (MIT)

Copyright © 2016 Maël Nison

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

colibrijs's People

Contributors

arcanis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

colibrijs's Issues

mongodb dependency error

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "http": false }
ERROR in ./node_modules/mongodb/lib/client-side-encryption/providers/utils.js 8:17-34
Module not found: Error: Can't resolve 'timers' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\client-side-encryption\providers'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "timers": require.resolve("timers-browserify") }'
- install 'timers-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "timers": false }
ERROR in ./node_modules/mongodb/lib/client-side-encryption/state_machine.js 7:11-33
Module not found: Error: Can't resolve 'fs/promises' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\client-side-encryption'
ERROR in ./node_modules/mongodb/lib/client-side-encryption/state_machine.js 8:12-26
Module not found: Error: Can't resolve 'net' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\client-side-encryption'
ERROR in ./node_modules/mongodb/lib/client-side-encryption/state_machine.js 9:12-26
Module not found: Error: Can't resolve 'tls' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\client-side-encryption'
ERROR in ./node_modules/mongodb/lib/cmap/auth/gssapi.js 7:12-26
Module not found: Error: Can't resolve 'dns' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\auth'
ERROR in ./node_modules/mongodb/lib/cmap/auth/mongocr.js 7:15-32
Module not found: Error: Can't resolve 'crypto' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\auth'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }
ERROR in ./node_modules/mongodb/lib/cmap/auth/mongodb_aws.js 7:15-32
Module not found: Error: Can't resolve 'crypto' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\auth'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }
ERROR in ./node_modules/mongodb/lib/cmap/auth/mongodb_aws.js 8:16-34
Module not found: Error: Can't resolve 'process' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\auth'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "process": require.resolve("process/browser") }'
- install 'process'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "process": false }
ERROR in ./node_modules/mongodb/lib/cmap/auth/mongodb_aws.js 9:15-30
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\auth'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongodb/lib/cmap/auth/mongodb_oidc/aws_service_workflow.js 7:11-24
Module not found: Error: Can't resolve 'fs' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\auth\mongodb_oidc'
ERROR in ./node_modules/mongodb/lib/cmap/auth/scram.js 8:15-32
Module not found: Error: Can't resolve 'crypto' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\auth'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }
ERROR in ./node_modules/mongodb/lib/cmap/auth/scram.js 9:15-30
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\auth'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongodb/lib/cmap/connect.js 7:12-26
Module not found: Error: Can't resolve 'net' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap'
ERROR in ./node_modules/mongodb/lib/cmap/connect.js 8:12-26
Module not found: Error: Can't resolve 'tls' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap'
ERROR in ./node_modules/mongodb/lib/cmap/connection.js 8:17-34
Module not found: Error: Can't resolve 'stream' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
ERROR in ./node_modules/mongodb/lib/cmap/connection.js 9:17-34
Module not found: Error: Can't resolve 'timers' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "timers": require.resolve("timers-browserify") }'
- install 'timers-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "timers": false }
ERROR in ./node_modules/mongodb/lib/cmap/connection.js 10:15-30
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongodb/lib/cmap/connection_pool.js 7:17-34
Module not found: Error: Can't resolve 'timers' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "timers": require.resolve("timers-browserify") }'
- install 'timers-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "timers": false }
ERROR in ./node_modules/mongodb/lib/cmap/handshake/client_metadata.js 7:11-24
Module not found: Error: Can't resolve 'os' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\handshake'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
- install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "os": false }
ERROR in ./node_modules/mongodb/lib/cmap/handshake/client_metadata.js 8:16-34
Module not found: Error: Can't resolve 'process' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\handshake'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "process": require.resolve("process/browser") }'
- install 'process'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "process": false }
ERROR in ./node_modules/mongodb/lib/cmap/message_stream.js 7:17-34
Module not found: Error: Can't resolve 'stream' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
ERROR in ./node_modules/mongodb/lib/cmap/wire_protocol/compression.js 7:15-30
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\wire_protocol'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongodb/lib/cmap/wire_protocol/compression.js 8:13-28
Module not found: Error: Can't resolve 'zlib' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cmap\wire_protocol'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "zlib": require.resolve("browserify-zlib") }'
- install 'browserify-zlib'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "zlib": false }
ERROR in ./node_modules/mongodb/lib/connection_string.js 7:12-26
Module not found: Error: Can't resolve 'dns' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib'
ERROR in ./node_modules/mongodb/lib/connection_string.js 9:14-28
Module not found: Error: Can't resolve 'url' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
- install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "url": false }
ERROR in ./node_modules/mongodb/lib/cursor/abstract_cursor.js 7:17-34
Module not found: Error: Can't resolve 'stream' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\cursor'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
ERROR in ./node_modules/mongodb/lib/encrypter.js 7:15-30
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongodb/lib/gridfs/download.js 7:17-34
Module not found: Error: Can't resolve 'stream' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\gridfs'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
ERROR in ./node_modules/mongodb/lib/gridfs/upload.js 7:17-34
Module not found: Error: Can't resolve 'stream' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\gridfs'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
ERROR in ./node_modules/mongodb/lib/mongo_client.js 7:13-26
Module not found: Error: Can't resolve 'fs' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib'
ERROR in ./node_modules/mongodb/lib/mongo_client.js 8:15-30
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongodb/lib/mongo_logger.js 8:15-30
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongodb/lib/sdam/common.js 7:17-34
Module not found: Error: Can't resolve 'timers' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\sdam'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "timers": require.resolve("timers-browserify") }'
- install 'timers-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "timers": false }
ERROR in ./node_modules/mongodb/lib/sdam/monitor.js 7:17-34
Module not found: Error: Can't resolve 'timers' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\sdam'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "timers": require.resolve("timers-browserify") }'
- install 'timers-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "timers": false }
ERROR in ./node_modules/mongodb/lib/sdam/server.js 7:15-30
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\sdam'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongodb/lib/sdam/srv_polling.js 7:12-26
Module not found: Error: Can't resolve 'dns' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\sdam'
ERROR in ./node_modules/mongodb/lib/sdam/srv_polling.js 8:17-34
Module not found: Error: Can't resolve 'timers' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\sdam'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "timers": require.resolve("timers-browserify") }'
- install 'timers-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "timers": false }
ERROR in ./node_modules/mongodb/lib/sdam/topology.js 7:15-30
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib\sdam'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongodb/lib/sessions.js 8:15-30
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongodb/lib/utils.js 8:15-32
Module not found: Error: Can't resolve 'crypto' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }
ERROR in ./node_modules/mongodb/lib/utils.js 9:13-28
Module not found: Error: Can't resolve 'http' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "http": false }
ERROR in ./node_modules/mongodb/lib/utils.js 10:17-34
Module not found: Error: Can't resolve 'timers' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "timers": require.resolve("timers-browserify") }'
- install 'timers-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "timers": false }
ERROR in ./node_modules/mongodb/lib/utils.js 11:12-26
Module not found: Error: Can't resolve 'url' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongodb\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
- install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "url": false }
ERROR in ./node_modules/mongoose/lib/cast.js 14:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/cast/bigint.js 3:15-32
Module not found: Error: Can't resolve 'assert' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\cast'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }'
- install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "assert": false }
ERROR in ./node_modules/mongoose/lib/cast/date.js 3:15-32
Module not found: Error: Can't resolve 'assert' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\cast'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }'
- install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "assert": false }
ERROR in ./node_modules/mongoose/lib/cast/decimal128.js 4:15-32
Module not found: Error: Can't resolve 'assert' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\cast'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }'
- install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "assert": false }
ERROR in ./node_modules/mongoose/lib/cast/number.js 3:15-32
Module not found: Error: Can't resolve 'assert' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\cast'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }'
- install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "assert": false }
ERROR in ./node_modules/mongoose/lib/cursor/aggregationCursor.js 8:17-43
Module not found: Error: Can't resolve 'stream' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\cursor'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
ERROR in ./node_modules/mongoose/lib/cursor/aggregationCursor.js 11:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\cursor'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/cursor/queryCursor.js 8:17-43
Module not found: Error: Can't resolve 'stream' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\cursor'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
ERROR in ./node_modules/mongoose/lib/cursor/queryCursor.js 13:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\cursor'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/document.js 32:16-39
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js 12:15-32
Module not found: Error: Can't resolve 'stream' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\drivers\node-mongodb-native'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
ERROR in ./node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js 13:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\drivers\node-mongodb-native'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/error/cast.js 7:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\error'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/error/notFound.js 7:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\error'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/error/setOptionError.js 8:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\error'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/error/validation.js 9:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\error'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/helpers/common.js 10:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\helpers'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/helpers/model/castBulkWrite.js 13:4-19
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\helpers\model'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/helpers/populate/modelNamesFromRefPath.js 7:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\helpers\populate'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/helpers/populate/validateRef.js 4:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\helpers\populate'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/model.js 65:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/query.js 42:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/schema.js 26:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/schema/array.js 17:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\schema'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/types/map.js 9:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\types'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mongoose/lib/types/subdocument.js 6:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mongoose\lib\types'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in ./node_modules/mquery/lib/mquery.js 6:15-32
Module not found: Error: Can't resolve 'assert' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mquery\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }'
- install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "assert": false }
ERROR in ./node_modules/mquery/lib/mquery.js 7:13-28
Module not found: Error: Can't resolve 'util' in 'c:\Users\karthikkrazy\zdata\announcements\node_modules\mquery\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.