最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - Error: Cannot find module '..buildDebugnodegit.node'

programmeradmin0浏览0评论
Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 4 years ago.

Improve this question

So i'm testing a plugin and i want to create a docker instance of wordpress in the root directory of the plugin with

wp-env start

I'm on ubuntu 20.04 LTS, i've installed npm and nodejs.

dara@hp-laptop-ubuntu-20-04-lts:~$ npm -v
6.14.4

dara@hp-laptop-ubuntu-20-04-lts:~$ nodejs -v
v10.19.0

however when i try to start the instance I get

dara@hp-laptop-ubuntu-20-04-lts:~$ wp-env start
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '../build/Debug/nodegit.node'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@wordpress/env/node_modules/nodegit/dist/nodegit.js:19:12)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

There's a nodegit.node in Build/Release but not in Debug folder with nodegit in it ...

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 4 years ago.

Improve this question

So i'm testing a plugin and i want to create a docker instance of wordpress in the root directory of the plugin with

wp-env start

I'm on ubuntu 20.04 LTS, i've installed npm and nodejs.

dara@hp-laptop-ubuntu-20-04-lts:~$ npm -v
6.14.4

dara@hp-laptop-ubuntu-20-04-lts:~$ nodejs -v
v10.19.0

however when i try to start the instance I get

dara@hp-laptop-ubuntu-20-04-lts:~$ wp-env start
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '../build/Debug/nodegit.node'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@wordpress/env/node_modules/nodegit/dist/nodegit.js:19:12)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

There's a nodegit.node in Build/Release but not in Debug folder with nodegit in it ...

Share Improve this question edited Jun 11, 2020 at 17:30 user3046711 32 bronze badges asked Jun 11, 2020 at 10:17 daradara 111 bronze badge 1
  • Welcome to WordPress Development. I hope you find the answer(s) you are looking for. Our site is different from most - if you have not done so yet, consider checking out the tour and help center to find out how things work. – Matthew Brown aka Lord Matt Commented Jun 11, 2020 at 15:55
Add a comment  | 

1 Answer 1

Reset to default 0

Somehow the directory tree for nodejs build/Debug folder got removed with an old wordpress plugin

Found it again with a

find -iname 'nodegit.node' -type f

Then just copied it back into the

usr/local/lib/node_modules/@wordpress/env/node_modules/

path and everything was OK again ...

发布评论

评论列表(0)

  1. 暂无评论