NPM Issues with @twilio/conversation:2.0.0

Anyone else having issues with NPM @twilio/conversation:2.0.0?

I am trying to upgrade my Twilio Conversation code to 2.0.0, but I cannot get my NPM to work on my laptop. Other packages work just fine.

npm install --save @twilio/conversations

And I tried:

npm i @twilio/conversations

Here is the error:

npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

Here is where it is being pulled from:

https://www.npmjs.com/package/@twilio/conversations

I can install other packages with no issues:

npm ll

+-- [email protected]

|

`-- [email protected]

Answers

  • That looks like a warning, not an error. Does the installation complete successfully or is there more to the output?

  • twilio/conversation will not install.

    It looks like it is failing on this error of -f was unexpected at this time: C:\Windows\system32\cmd.exe /d /s /c if [ -f ./dist/post-install.js ]; then node ./dist/post-install.js; fi

    Here is the log from the start of the warning:

    npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

    npm ERR! code 1

    npm ERR! path C:\Users\UserName\node_modules\@twilio\conversations

    npm ERR! command failed

    npm ERR! command C:\Windows\system32\cmd.exe /d /s /c if [ -f ./dist/post-install.js ]; then node ./dist/post-install.js; fi

    npm ERR! -f was unexpected at this time.


    npm ERR! A complete log of this run can be found in:

    npm ERR!   C:\Users\UserName\AppData\Local\npm-cache\_logs\2021-12-16T05_00_09_245Z-debug-0.log

    193 warn deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

    194 timing reifyNode:node_modules/twilio-sync/node_modules/uuid Completed in 307ms

    195 warn deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

    196 timing reifyNode:node_modules/twilsock/node_modules/uuid Completed in 308ms

    197 warn deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

    198 timing reifyNode:node_modules/@twilio/conversations/node_modules/uuid Completed in 308ms

    199 warn deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

    200 timing reifyNode:node_modules/@twilio/notifications/node_modules/uuid Completed in 310ms

    201 timing reifyNode:node_modules/@twilio/replay-event-emitter Completed in 319ms

    202 timing reifyNode:node_modules/@twilio/operation-retrier Completed in 321ms

    203 timing reifyNode:node_modules/@twilio/declarative-type-validator Completed in 350ms

    204 timing reifyNode:node_modules/loglevel Completed in 352ms

    205 timing reifyNode:node_modules/@twilio/mcs-client Completed in 362ms

    206 timing reifyNode:node_modules/@twilio/notifications Completed in 363ms

    207 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 393ms

    208 timing auditReport:getReport Completed in 395ms

    209 silly audit report {}

    210 timing auditReport:init Completed in 0ms

    211 timing reify:audit Completed in 397ms

    212 timing reifyNode:node_modules/twilsock Completed in 443ms

    213 timing reifyNode:node_modules/@babel/runtime Completed in 526ms

    214 timing reifyNode:node_modules/@twilio/conversations Completed in 600ms

    215 timing reifyNode:node_modules/twilio-sync Completed in 707ms

    216 timing reifyNode:node_modules/core-js Completed in 2571ms

    217 timing reify:unpack Completed in 2573ms

    218 timing reify:unretire Completed in 1ms

    219 timing build:queue Completed in 3ms

    220 timing build:link:node_modules/@twilio/conversations/node_modules/uuid Completed in 8ms

    221 timing build:link:node_modules/twilsock/node_modules/uuid Completed in 7ms

    222 timing build:link:node_modules/@twilio/notifications/node_modules/uuid Completed in 7ms

    223 timing build:link:node_modules/twilio-sync/node_modules/uuid Completed in 7ms

    224 timing build:link Completed in 8ms

    225 info run @twilio/[email protected] postinstall node_modules/@twilio/conversations if [ -f ./dist/post-install.js ]; then node ./dist/post-install.js; fi

    226 info run [email protected] postinstall node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"

    227 info run @twilio/[email protected] postinstall { code: 1, signal: null }

    228 info run [email protected] postinstall { code: 0, signal: null }

    229 timing build:run:postinstall:node_modules/core-js Completed in 111ms

    230 timing reify:rollback:createSparse Completed in 704ms

    231 timing reify:rollback:retireShallow Completed in 0ms

    232 timing command:install Completed in 3566ms

    233 verbose stack Error: command failed

    233 verbose stack   at ChildProcess.<anonymous> (C:\Users\UserName\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)

    233 verbose stack   at ChildProcess.emit (node:events:390:28)

    233 verbose stack   at maybeClose (node:internal/child_process:1064:16)

    233 verbose stack   at Socket.<anonymous> (node:internal/child_process:450:11)

    233 verbose stack   at Socket.emit (node:events:390:28)

    233 verbose stack   at Pipe.<anonymous> (node:net:687:12)

    234 verbose pkgid @twilio/[email protected]

    235 verbose cwd C:\Users\UserName\test

    236 verbose Windows_NT 10.0.19043

    237 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\UserName\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "@twilio/conversations"

    238 verbose node v16.13.1

    239 verbose npm v8.2.0

    240 error code 1

    241 error path C:\Users\UserName\node_modules\@twilio\conversations

    242 error command failed

    243 error command C:\Windows\system32\cmd.exe /d /s /c if [ -f ./dist/post-install.js ]; then node ./dist/post-install.js; fi

    244 error -f was unexpected at this time.

    245 verbose exit 1

    246 timing npm Completed in 4016ms

    247 verbose unfinished npm timer reify 1639629471463

    248 verbose unfinished npm timer reify:build 1639629474294

    249 verbose unfinished npm timer build 1639629474294

    250 verbose unfinished npm timer build:deps 1639629474294

    251 verbose unfinished npm timer build:run:postinstall 1639629474305

    252 verbose unfinished npm timer build:run:postinstall:node_modules/@twilio/conversations 1639629474306

    253 verbose code 1

    254 error A complete log of this run can be found in:

    254 error   C:\Users\UserName\AppData\Local\npm-cache\_logs\2021-12-16T04_37_51_018Z-debug-0.log

  • Hi @randallzapata ,

    This sounds pretty frustrating. I have setup a support ticket for you with our support team in hopes of getting you a solution! Please keep an eye out for an email from support. The email will be sent to the email you have registered with Forums with. Please let me know if you have any questions.

    Thank you for your patience!✨

  • Thank you @sbrijmohan! Can you link it to Ticket ID: 7556104?

  • It sounds like Twilio is going to fix this bug in the next release according to my Support Ticket.

    Thank you for everyone's help!

If this is an emergency, please contact Twilio Support. This is not an official Support channel. https://support.twilio.com/
Have an urgent question?
Please contact Twilio Support. This is not an official Support channel.
Contact Support