WordPress

rozwój wtyczki – WordPress 6.6.1 – Próba utworzenia bloku, ale otrzymuję błąd, „! Nie można odczytać właściwości 'then’ niezdefiniowanego”

  • 25 lipca, 2024
  • 3 min read
rozwój wtyczki – WordPress 6.6.1 – Próba utworzenia bloku, ale otrzymuję błąd, „! Nie można odczytać właściwości 'then’ niezdefiniowanego”


Śledzę ten post. Już w pierwszym poleceniu otrzymuję błąd err

npx @wordpress/create-block@latest todo-list

npm ERR! Cannot read property 'then' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/example/.npm/_logs/2024-07-25T10_00_18_279Z-debug-0.log
someuser@someserver:~/htdocs/example.com/wp-content/plugins$ npx @wordpress/create-block@latest todo-list
npm ERR! Cannot read property 'then' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/someuser/.npm/_logs/2024-07-25T10_07_52_541Z-debug-0.log

Zawartość dziennika błędów jest następująca:

0 verbose cli [
0 verbose cli   '/usr/bin/node',
0 verbose cli   '/usr/share/nodejs/npm/bin/npm-cli.js',
0 verbose cli   'exec',
0 verbose cli   '--',
0 verbose cli   '@wordpress/create-block@latest',
0 verbose cli   'todo-list'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 3ms
5 timing config:load:file:/usr/share/nodejs/npm/npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/home/someuser/htdocs/example.com/wp-content/plugins/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/home/someuser/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 12ms
19 timing npm:load:configload Completed in 12ms
20 timing npm:load:setTitle Completed in 0ms
21 timing config:load:flatten Completed in 3ms
22 timing npm:load:display Completed in 5ms
23 verbose logfile /home/someuser/.npm/_logs/2024-07-25T10_07_52_541Z-debug-0.log
24 timing npm:load:logFile Completed in 5ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 23ms
28 verbose stack TypeError: Cannot read property 'then' of undefined
28 verbose stack     at /usr/share/nodejs/cacache/lib/util/fix-owner.js:113:7
29 verbose cwd /home/someuser/htdocs/example.com/wp-content/plugins
30 verbose Linux 5.15.0-91-generic
31 verbose argv "/usr/bin/node" "/usr/share/nodejs/npm/bin/npm-cli.js" "exec" "--" "@wordpress/create-block@latest" "todo-list"
32 verbose node v12.22.9
33 verbose npm  v8.5.1
34 error Cannot read property 'then' of undefined
35 verbose exit 1
36 timing npm Completed in 1190ms
37 verbose unfinished npm timer command:exec 1721902072737
38 verbose code 1
39 error A complete log of this run can be found in:
39 error     /home/someuser/.npm/_logs/2024-07-25T10_07_52_541Z-debug-0.log

Będę wdzięczny za każdą pomoc.

Warto przeczytać!  7 najlepszych wielowalutowych wtyczek WordPress (bezpłatne + płatne)


Źródło