Nodebb build error after updated translation files



  • Tried to update some json files from translations folder of my language and I got the following error trying to build and restart Nodebb. Even after I reverted back the files I still got the error. ­čś× If someone has any clue about this the help is much appreciated.

    SyntaxError: Unexpected token 
     in JSON at position 4536
        at JSON.parse (<anonymous>)
        at /home/admin/web/mysite/public_html/src/meta/languages.js:105:41
        at /home/admin/web/mysite/public_html/node_modules/graceful-fs/graceful-fs.js:90:16
        at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
    2019-03-01T22:47:18.302Z [undefined/15635] - error: Unexpected token 
     in JSON at position 4536
    SyntaxError: Unexpected token 
     in JSON at position 4536
        at JSON.parse (<anonymous>)
        at /home/admin/web/mysite/public_html/src/meta/languages.js:105:41
        at /home/admin/web/mysite/public_html/node_modules/graceful-fs/graceful-fs.js:90:16
        at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
    
    

  • GNU/Linux Admin

    If you were updating the files, then it sounds like a syntax error in a file you changed.

    Can you paste the contents of that file?


  • Global Moderator

    To find which files are erroring, add

    console.error('json error in file', path.join(coreLanguagesPath, lang, namespace + '.json'));
    

    Before each of the following lines of the linked file:

    Line 108: https://github.com/NodeBB/NodeBB/blob/master/src/meta/languages.js#L108

    Line 140: https://github.com/NodeBB/NodeBB/blob/master/src/meta/languages.js#L140


Log in to reply
 

Suggested Topics

| |