Issue Summary
During the creation of a “headless” site I receive the error “cb.apply is not a function”. Note: I am seeing posts on the internet saying that Node 14+ should be associated with NPM 7+ not 5.
Troubleshooting Questions
-
Does this happen for all sites in Local, or just one in particular? All “headless” sites during install.
-
Are you able to create a new, plain WordPress site in Local and access it in a Browser? Yes. So long as I don’t make it a “headless” site.
Replication
Create a new site
Name the site and click continue
Choose “custom” for the environment
Set PHP v7.4.1, web server nginx v1.16.0, and DB MySQL v5.7.28
Check the “Enable Atlas Add-on on this site” box
Click “Continue”
Set your username/password and click “add site”
Screenshots of the error(s):
System Details
-
Which version of Local is being used? 5.10.5+5403
-
What Operating System (OS) and OS version is being used? Windows 10 Pro
-
Local log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli ‘C:\Users\jhixon\AppData\Local\Programs\Local\Local.exe’,
1 verbose cli ‘C:\Users\jhixon\AppData\Roaming\Local\addons\@getflywheel-local-addon-headless\node_modules\npx\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘install’,
1 verbose cli ‘create-next-app@latest’,
1 verbose cli ‘–global’,
1 verbose cli ‘–prefix’,
1 verbose cli ‘C:\Users\jhixon\npm-cache\_npx\5188’,
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@v14.16.0
4 verbose npm-session a89a0cbffab900f3
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 https://registry.npmjs.org/create-next-app 431ms (from cache)
8 silly pacote tag manifest for create-next-app@latest fetched in 485ms
9 verbose stack TypeError: cb.apply is not a function
9 verbose stack at C:\Users\jhixon\AppData\Roaming\Local\addons@getflywheel-local-addon-headless\node_modules\npx\node_modules\npm\node_modules\graceful-fs\polyfills.js:287:18
9 verbose stack at FSReqCallback.oncomplete (fs.js:184:5)
10 verbose cwd C:\Users\jhixon\Local Sites\fw-testing
11 verbose Windows_NT 10.0.19042
12 verbose argv “C:\Users\jhixon\AppData\Local\Programs\Local\Local.exe” “C:\Users\jhixon\AppData\Roaming\Local\addons\@getflywheel-local-addon-headless\node_modules\npx\node_modules\npm\bin\npm-cli.js” “install” “create-next-app@latest” “–global” “–prefix” “C:\Users\jhixon\npm-cache\_npx\5188” “–loglevel” “error” “–json”
13 verbose node v14.16.0
14 verbose npm v5.1.0
15 error cb.apply is not a function
16 verbose exit [ 1, true ]