Installation problem


  • 捕获.JPG

    I followed the setup guide written here https://docs.nodebb.org/installing/os/ubuntu/ and it shows such problem and was stuck there....

  • Global Moderator

    What version of node and npm?


  • $ node -v
    v12.16.3
    $ npm -v
    6.14.4
    

    Its a fresh server, and I am sure I did nothing wrong and it should work.


  • I tried ./nodebb setup again, it says:

    y@iZ8vb5zw2bx60ytuhcwlwiZ:~/nodebb$ ./nodebb setup
    Dependencies outdated or not yet installed.
    Installing them now...
    
    npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
    npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
    npm WARN deprecated bson@1.0.9: Fixed a critical issue with BSON serialization documented in CVE-2019-2391, see https://bit.ly/2KcpXdo for more details
    npm ERR! Unexpected end of JSON input while parsing near '...party/-/connect-multi'
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/d/.npm/_logs/2020-05-08T23_05_32_874Z-debug.log
    Error installing dependencies!
    message: Command failed: npm install --production
    stdout: null
    stderr: null
    /home/dyfluid/nodebb/src/cli/package-install.js:72
    		throw e;
    		^
    
    Error: Command failed: npm install --production
        at checkExecSyncError (child_process.js:630:11)
        at Object.execSync (child_process.js:666:15)
        at Object.installAll (/home/dyfluid/nodebb/src/cli/package-install.js:63:9)
        at Object.<anonymous> (/home/dyfluid/nodebb/src/cli/index.js:60:18)
        at Module._compile (internal/modules/cjs/loader.js:1133:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
        at Module.load (internal/modules/cjs/loader.js:977:32)
        at Function.Module._load (internal/modules/cjs/loader.js:877:14)
        at Module.require (internal/modules/cjs/loader.js:1019:19)
        at require (internal/modules/cjs/helpers.js:77:18) {
      status: 1,
      signal: null,
      output: [ null, null, null ],
      pid: 2128,
      stdout: null,
      stderr: null
    }
    

    Here is the npm log in /home/dd/.npm/_logs/2020-05-08T23_05_32_874Z-debug.log

    2523 silly saveTree ├── xml@1.0.1
    2523 silly saveTree ├── xregexp@4.3.0
    2523 silly saveTree └── zxcvbn@4.4.2
    2524 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...party/-/connect-multi'
    2524 verbose stack     at JSON.parse (<anonymous>)
    2524 verbose stack     at parseJson (/usr/lib/node_modules/npm/node_modules/json-parse-better-errors/index.js:7:17)
    2524 verbose stack     at /usr/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:96:50
    2524 verbose stack     at runMicrotasks (<anonymous>)
    2524 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:97:5)
    2525 verbose cwd /home/d/nodebb
    2526 verbose Linux 4.15.0-96-generic
    2527 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "--production"
    2528 verbose node v12.16.3
    2529 verbose npm  v6.14.4
    2530 error Unexpected end of JSON input while parsing near '...party/-/connect-multi'
    2531 verbose exit [ 1, true ]
    
  • Admin Staff

    Does npm i connect-multiparty work on it's own??


  • It says

    ~/nodebb$ npm i connect-multiparty
    npm ERR! Unexpected end of JSON input while parsing near '...party/-/connect-multi'
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/d/.npm/_logs/2020-05-09T06_13_21_143Z-debug.log
    

  • I input npm cache clean --force and the problem is solved, I dont know why though.


  • @sharonyue said in Installation problem:

    npm cache clean --force

    I install a new test server and run into this problem again...I dont know where the problem come from but the command above fixed it.

    How about we fix that in nodebb code? or is it coming from my OS? I using ubuntu 18.04. I dont know..

  • Global Moderator

    This is a problem with npm. You could try using yarn instead, but it's not something that nodebb can fix.

Suggested Topics

  • 1
  • 30
  • 2
  • 2
  • 5
| |