NodeBB: Difference between revisions

From iFixWiki
No edit summary
No edit summary
Line 2: Line 2:


= Issues =
= Issues =
== Can't install nodebb-plugin-mybb-import ==
When trying to install this plugin either from the nodeBB admin page or the command-line interface (CLI), an error will pop up saying:
 
    $ npm install nodebb-plugin-import
    > iconv@2.3.5 install /var/nodebb/node_modules/iconv
    > node-gyp rebuild
    make: Entering directory '/var/nodebb/node_modules/iconv/build'
      CXX(target) Release/obj.target/iconv/src/binding.o
    make: g++: Command not found
    iconv.target.mk:107: recipe for target 'Release/obj.target/iconv/src/binding.o' failed
    make: *** [Release/obj.target/iconv/src/binding.o] Error 127
    make: Leaving directory '/var/nodebb/node_modules/iconv/build'
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack    at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:191:23)
    gyp ERR! stack    at ChildProcess.emit (events.js:198:13)
    gyp ERR! stack    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /var/nodebb/node_modules/iconv
    gyp ERR! node -v v10.23.2
    gyp ERR! node-gyp -v v5.1.0
    gyp ERR! not ok
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! iconv@2.3.5 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the iconv@2.3.5 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
   
'''Solution<ref>https://github.com/bnoordhuis/node-iconv/issues/164#issuecomment-292122618</ref>'''
From the CLI, install these dependencies:
    $ apt install g++
    $ npm install node-gyp
    $ npm install iconv
== SyntaxError: Unexpected end of JSON  ==
== SyntaxError: Unexpected end of JSON  ==
When trying to setup or upgrade nodeBB sometimes an error pops up that says  
When trying to setup or upgrade nodeBB sometimes an error pops up that says  

Revision as of 04:53, 11 February 2021

NodeBB is a forum software that's modern, fast, and efficient. In contrast to most forums which use PHP, NodeBB leverages Node.js and JavaScript to create a high performance website.

Issues

Can't install nodebb-plugin-mybb-import

When trying to install this plugin either from the nodeBB admin page or the command-line interface (CLI), an error will pop up saying:

   $ npm install nodebb-plugin-import
   > iconv@2.3.5 install /var/nodebb/node_modules/iconv
   > node-gyp rebuild
   make: Entering directory '/var/nodebb/node_modules/iconv/build'
     CXX(target) Release/obj.target/iconv/src/binding.o
   make: g++: Command not found
   iconv.target.mk:107: recipe for target 'Release/obj.target/iconv/src/binding.o' failed
   make: *** [Release/obj.target/iconv/src/binding.o] Error 127
   make: Leaving directory '/var/nodebb/node_modules/iconv/build'
   gyp ERR! build error
   gyp ERR! stack Error: `make` failed with exit code: 2
   gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:191:23)
   gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
   gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
   gyp ERR! cwd /var/nodebb/node_modules/iconv
   gyp ERR! node -v v10.23.2
   gyp ERR! node-gyp -v v5.1.0
   gyp ERR! not ok
   npm ERR! code ELIFECYCLE
   npm ERR! errno 1
   npm ERR! iconv@2.3.5 install: `node-gyp rebuild`
   npm ERR! Exit status 1
   npm ERR!
   npm ERR! Failed at the iconv@2.3.5 install script.
   npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
   

Solution[1]

From the CLI, install these dependencies:

   $ apt install g++
   $ npm install node-gyp
   $ npm install iconv

SyntaxError: Unexpected end of JSON

When trying to setup or upgrade nodeBB sometimes an error pops up that says

  SyntaxError: Unexpected end of JSON input while parsing near '...party/-/connect-multi'

Solution[2]

Run the command:

  npm cache clean --force

TypeError: shim$1.Parser.looksLikeNumber is not a function nodebb

After upgrading nodeBB, sometimes an error appears that says

    nodebb/node_modules/yargs/build/index.cjs:2804
              if (shim$1.Parser.looksLikeNumber(arg) &&
                         ^
                       TypeError: shim$1.Parser.looksLikeNumber is not a function

Solution

Update the npm dependencies by running the command

  npm update

References