I have installed the clevertap-web-sdk with react 18, when I try initilize the Clevertap with account ID, I am getting below error:
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
(node:7236) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:7236) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
Starting the development server...
Compiled with warnings.
Module not found: Error: Can't resolve 'crypto' in '\node_modules\clevertap-web-sdk'
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 }
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
WARNING in ./node_modules/clevertap-web-sdk/clevertap.js 372:23-40
Module not found: Error: Can't resolve 'crypto' in '\node_modules\clevertap-web-sdk'
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 }
webpack compiled with 1 warning
Files successfully emitted, waiting for typecheck results...
Issues checking in progress...
Compiling...
Compiled with warnings.
Dependencies package https://www.npmjs.com/package/crypto-js is discountinued, could you anyone help me on this
I have installed the clevertap-web-sdk with react 18, when I try initilize the Clevertap with account ID, I am getting below error:
Dependencies package https://www.npmjs.com/package/crypto-js is discountinued, could you anyone help me on this