ConfluenceToWikiJS icon indicating copy to clipboard operation
ConfluenceToWikiJS copied to clipboard

Cannot find module 'node-html-parser'

Open aasimenator opened this issue 3 years ago • 2 comments

Hi, I am running the latest version of Ubuntu, when running your code as specified in your docs I am getting the below error.

`sudo node confluence2wikijs.js import/ Export/ internal/modules/cjs/loader.js:818 throw err; ^

Error: Cannot find module 'node-html-parser' Require stack:

  • /home/ConfluenceToWikiJS/confluence2wikijs.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15) at Function.Module._load (internal/modules/cjs/loader.js:667:27) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/home/ConfluenceToWikiJS/confluence2wikijs.js:4:18) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/ConfluenceToWikiJS/confluence2wikijs.js' ] } aasim@Wiki:/home/ConfluenceToWikiJS$ sudo apt install node-htmlparser Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package node-htmlparser aasim@Wiki:/home/ConfluenceToWikiJS$ sudo apt install node-html-parser Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package node-html-parser `

there is no such module called node-html-parser, I tried installing node-htmlparser2 and changing the name node-html-parser to node-htmlparser2 in .js file but that didn't help either.

Any help would be appreciated.

aasimenator avatar Aug 12 '22 12:08 aasimenator

Try installing it with npm install --save node-html-parser

More info here: https://www.npmjs.com/package/node-html-parser

n0i2 avatar Sep 04 '22 09:09 n0i2

I got it to work by opening the directory of the script in Visual Studio code and then running the command npm install --save node-html-parser then running the script within VS Code.

catagris avatar Feb 08 '23 10:02 catagris