codemod
codemod copied to clipboard
Transformation error (Cannot read properties of undefined (reading 'map'))
We are trying to migrate protractor automation suits to webdriverio. we are seeing type error for transforming config.js using command npx jscodeshift -t ./node_modules/@wdio/codemod/protractor config/config.js
Error message : ERR config/config.js Transformation error (Cannot read properties of undefined (reading 'map'))exact error is Transformation error (Cannot read properties of undefined (reading 'map'))
From stacktrace : node_modules/@wdio/codemod/protractor/utils.js:297:61)
const suites = require('./suites').suites
I have installed codemod and wdio/cli using command
npm install jscodeshift @wdio/codemod
npm install --save-dev @wdio/cli
Attached config file
Thanks for reporting.
Can you provide the code section that causes this error to appear?
We would appreciate any help on this so please help us out! Have a look at our contributing guidelines and reach out if you have any questions. Cheers!
Here is the stack trace
ERR config/config.js Transformation error (Cannot read properties of undefined (reading 'map'))
TypeError: Cannot read properties of undefined (reading 'map')
at Function.map (/Users/xyz/Documents/towebdriverio/ui-test/node_modules/@wdio/codemod/protractor/utils.js:297:61)
at Array.map (