[Solved] Uncaught ReferenceError: require is not defined



  • Hi,

    I cloned the latest source and run 'npm install', but when I access the forum, it always show the following error and the real content is not shown. I have tried many times, the result is the same. Please help me. Thank you.

    Screen Shot 2014-02-01 at 8.51.41 AM.png



  • @anderson916

    it works now. I don't know why it happened and why it disappeared.



  • I had the same error, it was because nodebb.min.js was empty and it didn't generate this file automatically, so in src/meta.js file line 267 i removed this part of script to avoid skipping minification and it has worked.

    if (results.minFile > results.mtime) {
    	winston.info('No changes to client-side libraries -- skipping minification');
    	callback(null, [path.relative(path.join(__dirname, '../public'), Meta.js.minFile) + (meta.config['cache-buster'] ? '?v=' + meta.config['cache-buster'] : '')]);
    	} else {
    


  • great hint.


Log in to reply
 

Suggested Topics

| |