[nodebb-plugin-import] Import your forum to NBB



  • @baris said in [nodebb-plugin-import] Import your forum to NBB:

    Try with nodejs 8/10/12

    Any point in running npm audit fix on current version of nodejs?

    Meanwhile, let's do this - upgrade from node 11.15.0 npm 6.7.0 to node 12.

    To note. I experienced (unresolved) erros in past when installing fresh nodejs 12 when it came to the nodeBB install (v1.12).

    If that doesn't work I'll try a downgrade to nodejs 10!!!



  • errrggggghhh.... used n to upgrade/downgrade and with between versions of nodejs , ran the instal via terminal. same deal, now onto

    Err msg node12

    gyp ERR! build error 
    gyp ERR! stack Error: not found: make
    gyp ERR! stack     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
    gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
    gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
    gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
    gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
    gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
    gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:149:21)
    gyp ERR! System Linux 4.15.0-51-generic
    gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/node/nodebb/node_modules/iconv
    gyp ERR! node -v v12.3.1
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok 
    npm WARN textcomplete.contenteditable@0.1.1 requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself.
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! iconv@2.3.4 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the iconv@2.3.4 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/node/.npm/_logs/2019-06-18T20_28_54_773Z-debug.log
    

    Err msg node10

    gyp ERR! build error 
    gyp ERR! stack Error: not found: make
    gyp ERR! stack     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
    gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
    gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
    gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
    gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
    gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
    gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:153:21)
    gyp ERR! System Linux 4.15.0-51-generic
    gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/node/nodebb/node_modules/iconv
    gyp ERR! node -v v10.16.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok 
    npm WARN textcomplete.contenteditable@0.1.1 requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself.
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! iconv@2.3.4 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the iconv@2.3.4 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/node/.npm/_logs/2019-06-18T20_32_32_662Z-debug.log
    

    Also got a similar error for node8 too.



  • So far nothing has worked to successfully install this plugin, so I am not sure at this point what to do.

    I need to get a discourse base into nodeBB asap, so all help appreciated in advance. Thanks!



  • To see if maybe, a small maybe, there might be a permissions aspect to this problem I ran this plugin as both sudo & root user.

    Sudo

    gyp ERR! configure error 
    gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/node/nodebb/node_modules/iconv/build'
    gyp ERR! System Linux 4.15.0-51-generic
    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/node/nodebb/node_modules/iconv
    gyp ERR! node -v v11.15.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok 
    npm WARN textcomplete.contenteditable@0.1.1 requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself.
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! iconv@2.3.4 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the iconv@2.3.4 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/node/.npm/_logs/2019-06-19T16_39_04_031Z-debug.log
    

    Root

    gyp ERR! build error 
    gyp ERR! stack Error: not found: make
    gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
    gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
    gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
    gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
    gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
    gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
    gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:158:21)
    gyp ERR! System Linux 4.15.0-51-generic
    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /root/node_modules/iconv
    gyp ERR! node -v v11.15.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok 
    npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
    npm WARN root No description
    npm WARN root No repository field.
    npm WARN root No README data
    npm WARN root No license field.
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! iconv@2.3.4 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the iconv@2.3.4 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /root/.npm/_logs/2019-06-19T16_39_59_807Z-debug.log
    

    node11


  • Global Moderator

    @omega what OS are you on? That's a weird error it seems like make is missing from your system.


  • Community Rep

    @omega what is the output of this call:

    cat /etc/os-release

    Do you remember if you installed node or any npm packages as root (which is the user youโ€™re running commands with when you sudo)?

    What is your hosting provider?

    The errors youโ€™re getting are not typical for node installations so you need to provide more information about your environment.

    As an aside Iโ€™ve had a lot of trouble with n and will probably migrate back to nvm



  • @Bri said in [nodebb-plugin-import] Import your forum to NBB:

    cat /etc/os-release

    As far as I Can remember, I installed node, nginx as root.

    nodeBB was as user in sudo group.

    I had issues with permission with embed plugin in other thread but resolved that after guidance I need a non root user to complete the nodeBB part of the install, but I'm open to further guidance as to what is the best course. Maybe I should have not installed nodejs as root, maybe only install nginx as root and do everything else a non-root user.

    What about running updates/upgrades?

    Host: Digitalocean

    NAME="Ubuntu"
    VERSION="18.04.2 LTS (Bionic Beaver)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 18.04.2 LTS"
    VERSION_ID="18.04"

    Thanks. I'll try nvm in future. Good to know. This is new for me.


  • Global Moderator

    Try sudo apt install build-essential



  • @PitaJ said in [nodebb-plugin-import] Import your forum to NBB:

    Try sudo apt install build-essential

    Thanks & Ok DONE! ๐Ÿ™‚ Anything else?



  • Mmmm... I can't wait for the one-click! ๐Ÿ˜‰

    I ran essential build, used nvm and installed nodejs 12.4.0, all done as root user (sudo had issues).

    Finally, I can see it listed in the ACP plugin list as installed ... bella Bella! ๐Ÿ˜™

    However I see no sign of it in the plugins drop down list, lets restart & rebuild... and it's all broken. One or more plugins has broken NodeBB and it's not starting, probably permission bitting me in the ass again... ok back to the drawing board. ๐Ÿ˜ฌ


  • Global Moderator

    Try running ./nodebb build after stopping NodeBB from the console



  • @PitaJ Yea thanks. I had actually done that. Thought I posted same.

    I disabled plugins. Works.

    Basically This is a temp install to test importing a discourse dB.

    Iโ€™ll play around more tomorrow. I might rebuild a new stack.


  • Global Moderator

    Please consider the following

    • test using Node 10, not Node 12
    • post any errors you encounter while running a build or starting NodeBB
    • use ./nodebb dev so you can see the errors in real time.
    • either do everything on root, or only use sudo with apt, systemctl, or other linux commands
    • install NodeBB to your user's home folder, so you know that permissions will be fine


  • @PitaJ said in [nodebb-plugin-import] Import your forum to NBB:

    Please consider the following

    • test using Node 10, not Node 12
    • post any errors you encounter while running a build or starting NodeBB
    • use ./nodebb dev so you can see the errors in real time.
    • either do everything on root, or only use sudo with apt, systemctl, or other linux commands
    • install NodeBB to your user's home folder, so you know that permissions will be fine

    I ran this as sudo, a bit tricky installing Redis but everything installed as sudo (no need for nginx) but when it came to import plugin, same issue, looking like permissions - so forget that - I redid nodebb install all as root.

    Both plugins import & import-discourse are installed and active, and all other plugins are de-activated.

    My next question:

    Is the import-plugin available somewhere via ACP or is it all command line?

    I see screenshots on the git page but see nothing in the Plugins dropdown.

    ๐Ÿ˜“


  • Global Moderator

    @omega what issue are you referring to when you say it looks like permissions?

    Have you tried running ./nodebb build again? Are you installing the plugin through the ACP or the command line?

    Yes I'm pretty sure there should be an entry for the import plugin in the ACP but perhaps I'm incorrect. Have you tried accessing /admin/plugins/import directly?



  • @PitaJ said in [nodebb-plugin-import] Import your forum to NBB:

    /admin/plugins/import

    Thanks for the reply.

    • Permssions error of doom on mkdir... as per previous type errors. It kind of doesn't matter for this install as it's only being used to test the importability of a discourse database.

    • Yes I run ./nodebb build after any installs via cmd line.

    However I stepped away for a couple of hours from this, read you reply then logged in to ACP and BOOM I can see the IMPORT in plugins menu and ancillary screens!

    Good tip /admin/plugins/import by the way! Kind of handy for future reference.

    I appreciate your patience, questions and insight always ๐Ÿ‘


Log in to reply
 

Suggested Topics

| |