other-emerald
other-emerald12mo ago

Migration from v3 to v4 failed : error cb.apply is not a function

Error when running npx @refinedev/codemod@latest refine3-to-refine4
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/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 '@refinedev/codemod@latest',
1 verbose cli '--global',
1 verbose cli '--prefix',
1 verbose cli '/home/User/.npm/_npx/51651',
1 verbose cli '--loglevel',
1 verbose cli 'error',
1 verbose cli '--json'
1 verbose cli ]
2 info using npm@5.1.0
3 info using node@v16.18.1
4 verbose npm-session c4215e22bd46a1e6
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/@refinedev%2fcodemod 50ms (from cache)
8 silly pacote tag manifest for @refinedev/codemod@latest fetched in 80ms
9 verbose stack TypeError: cb.apply is not a function
9 verbose stack at /usr/local/lib/node_modules/npx/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
9 verbose stack at FSReqCallback.oncomplete (node:fs:203:5)
10 verbose cwd /home/User/Work/Projects/admin-panel
11 verbose Linux 6.2.15-100.fc36.x86_64
12 verbose argv "/usr/bin/node" "/usr/local/lib/node_modules/npx/node_modules/npm/bin/npm-cli.js" "install" "@refinedev/codemod@latest" "--global" "--prefix" "/home/davis/.npm/_npx/51651" "--loglevel" "error" "--json"
13 verbose node v16.18.1
14 verbose npm v5.1.0
15 error cb.apply is not a function
16 verbose exit [ 1, true ]
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/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 '@refinedev/codemod@latest',
1 verbose cli '--global',
1 verbose cli '--prefix',
1 verbose cli '/home/User/.npm/_npx/51651',
1 verbose cli '--loglevel',
1 verbose cli 'error',
1 verbose cli '--json'
1 verbose cli ]
2 info using npm@5.1.0
3 info using node@v16.18.1
4 verbose npm-session c4215e22bd46a1e6
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/@refinedev%2fcodemod 50ms (from cache)
8 silly pacote tag manifest for @refinedev/codemod@latest fetched in 80ms
9 verbose stack TypeError: cb.apply is not a function
9 verbose stack at /usr/local/lib/node_modules/npx/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
9 verbose stack at FSReqCallback.oncomplete (node:fs:203:5)
10 verbose cwd /home/User/Work/Projects/admin-panel
11 verbose Linux 6.2.15-100.fc36.x86_64
12 verbose argv "/usr/bin/node" "/usr/local/lib/node_modules/npx/node_modules/npm/bin/npm-cli.js" "install" "@refinedev/codemod@latest" "--global" "--prefix" "/home/davis/.npm/_npx/51651" "--loglevel" "error" "--json"
13 verbose node v16.18.1
14 verbose npm v5.1.0
15 error cb.apply is not a function
16 verbose exit [ 1, true ]
4 Replies
kapa.ai
kapa.ai12mo ago
Hi @ganuzaz. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
kapa.ai
kapa.ai12mo ago
---------------------- Hmm, I don't know enough to give you a confident answer yet. However, you can try the following solutions to resolve compile errors after upgrading: Solution 1: 1. Remove the node_modules folder. 2. Remove the package-lock.json file. 3. Run npm install. Solution 2:
npm install react@latest react-dom@latest
npm install react@latest react-dom@latest
If the issue persists, I recommend checking the refine documentation (https://refine.dev/docs) and blogs (https://refine.dev/blog) for more information. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
Overview | refine
What is refine?
Blog | refine
A Docusaurus powered blog!
kapa.ai
kapa.ai12mo ago
<@149140198213550080> kapa.ai is still learning and improving, please let us how it did by reacting below
other-emerald
other-emerald12mo ago
did both and still doesn't work resolved by updating node into lts