react-codemod
react-codemod copied to clipboard
update-react-imports: cb.apply is not a function
On running
npx react-codemod update-react-imports
got the following error:
npm ERR! cb.apply is not a function
npm ERR! A complete log of this run can be found in:
npm ERR! /home/gshilin/.npm/_logs/2020-10-30T03_40_28_404Z-debug.log
Install for [ 'react-codemod@latest' ] failed with code 1
That's content of the log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/snap/node/3168/bin/node',
1 verbose cli '/usr/local/lib/node_modules/npx/node_modules/npm/bin/npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'react-codemod@latest',
1 verbose cli '--global',
1 verbose cli '--prefix',
1 verbose cli '/home/gshilin/.npm/_npx/16996',
1 verbose cli '--loglevel',
1 verbose cli 'error',
1 verbose cli '--json'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session a07f8b2c63bcdc47
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/react-codemod 3300ms
8 http fetch GET 200 https://registry.npmjs.org/react-codemod/-/react-codemod-5.4.3.tgz 250ms
9 silly pacote tag manifest for react-codemod@latest fetched in 3988ms
10 verbose stack TypeError: cb.apply is not a function
10 verbose stack at /usr/local/lib/node_modules/npx/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
10 verbose stack at FSReqCallback.oncomplete (fs.js:169:5)
11 verbose cwd /home/gshilin/projects/kmedia-mdb
12 verbose Linux 5.4.0-52-generic
13 verbose argv "/snap/node/3168/bin/node" "/usr/local/lib/node_modules/npx/node_modules/npm/bin/npm-cli.js" "install" "react-codemod@latest" "--global" "--prefix" "/home/gshilin/.npm/_npx/16996" "--loglevel" "error" "--json"
14 verbose node v12.19.0
15 verbose npm v5.1.0
16 error cb.apply is not a function
17 verbose exit [ 1, true ]
Node version: v12.19.0 React: 17.0