Nodebb build error after updated translation files

General Discussion
  • 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)
    
    
  • 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?

  • 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


Suggested Topics


  • 0 Votes
    1 Posts
    542 Views
  • 0 Votes
    1 Posts
    874 Views
  • 0 Votes
    9 Posts
    5143 Views
  • 0 Votes
    3 Posts
    1542 Views
  • 0 Votes
    1 Posts
    799 Views