Module Not Found error while using crypto-js

0
while using crypto-js i’am getting this error     Browserslist: caniuse-lite is outdated. Please run:   npx browserslist@latest --update-db   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating [webpack-cli] ModuleNotFoundError: Module not found: Error: Can't resolve 'crypto-js' in 'C:\Users\r.mallaiah.sathish\Documents\Mendix\VisionToValue-V2V_POC_Branch_3\javascriptsource\visiontovaluemodule\actions'     at C:\Program Files\Mendix\9.12.5.50423\modeler\tools\node\node_modules\webpack\lib\Compilation.js:2014:28     at C:\Program Files\Mendix\9.12.5.50423\modeler\tools\node\node_modules\webpack\lib\NormalModuleFactory.js:791:13     at eval (eval at create (C:\Program Files\Mendix\9.12.5.50423\modeler\tools\node\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)     at C:\Program Files\Mendix\9.12.5.50423\modeler\tools\node\node_modules\webpack\lib\NormalModuleFactory.js:265:22     at eval (eval at create (C:\Program Files\Mendix\9.12.5.50423\modeler\tools\node\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:35:1)     at C:\Program Files\Mendix\9.12.5.50423\modeler\tools\node\node_modules\webpack\lib\NormalModuleFactory.js:427:22     at C:\Program Files\Mendix\9.12.5.50423\modeler\tools\node\node_modules\webpack\lib\NormalModuleFactory.js:111:11     at C:\Program Files\Mendix\9.12.5.50423\modeler\tools\node\node_modules\webpack\lib\NormalModuleFactory.js:663:25     at C:\Program Files\Mendix\9.12.5.50423\modeler\tools\node\node_modules\webpack\lib\NormalModuleFactory.js:848:8     at C:\Program Files\Mendix\9.12.5.50423\modeler\tools\node\node_modules\webpack\lib\NormalModuleFactory.js:968:5 resolve 'crypto-js' in 'C:\Users\r.mallaiah.sathish\Documents\Mendix\VisionToValue-V2V_POC_Branch_3\javascriptsource\visiontovaluemodule\actions'   Parsed request is a module   No description file found in C:\Users\r.mallaiah.sathish\Documents\Mendix\VisionToValue-V2V_POC_Branch_3\javascriptsource\visiontovaluemodule\actions or above   resolve as module     C:\Users\r.mallaiah.sathish\Documents\Mendix\VisionToValue-V2V_POC_Branch_3\javascriptsource\visiontovaluemodule\actions\node_modules doesn't exist or is not a directory     C:\Users\r.mallaiah.sathish\Documents\Mendix\VisionToValue-V2V_POC_Branch_3\javascriptsource\visiontovaluemodule\node_modules doesn't exist or is not a directory     C:\Users\r.mallaiah.sathish\Documents\Mendix\VisionToValue-V2V_POC_Branch_3\javascriptsource\node_modules doesn't exist or is not a directory     C:\Users\r.mallaiah.sathish\Documents\Mendix\VisionToValue-V2V_POC_Branch_3\node_modules doesn't exist or is not a directory     C:\Users\r.mallaiah.sathish\Documents\Mendix\node_modules doesn't exist or is not a directory     C:\Users\r.mallaiah.sathish\Documents\node_modules doesn't exist or is not a directory     C:\Users\r.mallaiah.sathish\node_modules doesn't exist or is not a directory     C:\Users\node_modules doesn't exist or is not a directory     C:\node_modules doesn't exist or is not a directory
asked
1 answers
2

Hi Rakshith,

It could help if you would elaborate a little bit about what you are trying to achieve. But for what I can see, you haven't actually installed the crypto-js library. You can read how to do this here. You need to have npm installed and run the following code in your /actions folder:

npm i crypto-js

Mendix only has a limited out-of-the-box set of commands from Core JS and the Mozilla Fetch API (doc). Other libraries/functions need to be installed by yourself.

 

Hope this helps.

answered