admin管理员组文章数量:1122846
I am following this post. In the very first command I get an 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/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
The content of the error log is;
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/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/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
Appreciate any help please.
Is the below to be run as sudo or root?
npx @wordpress/create-block@latest todo-list
if I run as sudo I get this error
sudo npx @wordpress/create-block@latest
sh: 1: wp-create-block: Permission denied
root is the same.
Any ideas anyone?
本文标签:
版权声明:本文标题:plugin development - Wordpress 6.6.1 - Trying to make a block but receive error, "! Cannot read property 'then& 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736299506a1930478.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论