html => html.split('window._sharedData = ')[1].split(';')[0]
^
TypeError: Cannot read properties of undefined (reading 'split')
at C:\Users\kiran\code\instagram-web-api\node_modules\instagram-web-api\lib\index.js:109:55
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Instagram.login (C:\Users\kiran\code\instagram-web-api\node_modules\instagram-web-api\lib\index.js:100:26)
html => html.split('window._sharedData = ')[1].split(';')[0] ^
TypeError: Cannot read properties of undefined (reading 'split') at C:\Users\kiran\code\instagram-web-api\node_modules\instagram-web-api\lib\index.js:109:55 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Instagram.login (C:\Users\kiran\code\instagram-web-api\node_modules\instagram-web-api\lib\index.js:100:26)
Node.js v20.11.0
i just do it
client.login().then(_ => { console.log('Logged in!') client.getProfile().then(console.log) })