cozy-banks icon indicating copy to clipboard operation
cozy-banks copied to clipboard

Improvement when build services (lang and dictRequire)

Open flohhhh opened this issue 3 years ago • 0 comments

During the override of the project, it was necessary to add:

lang and dictRequire in CategoryBudget (for example)

it shouldn't be necessary.

This same code is in src/utils/lang we should be able to use it with just utils/lang

We have the following error when this command is runned NODE_ENV=${NODE_ENV:-services:production} npm run commons:build:

ModuleNotFoundError: Module not found: Error: Can't resolve 'utils/lang' in '/Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/src/ducks/notifications/CategoryBudget'
    at factory.create (/Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/webpack/lib/Compilation.js:925:10)
    at factory (/Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/webpack/lib/NormalModuleFactory.js:401:22)
    at resolver (/Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/webpack/lib/NormalModuleFactory.js:130:21)
    at asyncLib.parallel (/Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/webpack/lib/NormalModuleFactory.js:224:22)
    at /Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/neo-async/async.js:2830:7
    at /Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/neo-async/async.js:6877:13
    at normalResolver.resolve (/Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/webpack/lib/NormalModuleFactory.js:214:25)
    at doResolve (/Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/enhanced-resolve/lib/Resolver.js:184:12)
    at hook.callAsync (/Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at resolver.doResolve (/Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5)
    at hook.callAsync (/Users/florianpires/Developer/cozy/maif-epa-customizations/cozy-banks/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at

flohhhh avatar Aug 10 '21 14:08 flohhhh