I do not understand the kind of problems
-
config.json:
{ "url": "http://site.com", "port": ["4567","4568"], "secret": "secret", "database": "redis", "redis": { "host": "127.0.0.1", "port": "6379", "password": "", "database": "0" } }
nginx:
server { listen 80; server_name site.com; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://io_nodes; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } } upstream io_nodes { ip_hash; server 127.0.0.1:4567; server 127.0.0.1:4568; }
Nginx version: 1.8.1
-
Chorme console:
Uncaught ReferenceError: require is not defined
require.config({ baseUrl: "/src/modules", waitSeconds: 3, urlArgs: "d9a7eebd-0f41-4e4e-acc8-49b8788a754d", paths: { 'forum': '../client', 'admin': '../admin', 'vendor': '../../vendor', 'mousetrap': '../../bower/mousetrap/mousetrap' } });
Uncaught ReferenceError: require is not defined
require(['forum/footer']);
-
@julian fixed.
nginx:
server { listen 80; server_name example.com; location / { proxy_pass http://localhost:4567/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_redirect off; proxy_buffering off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
config json:
"port": "4567",
In this way, the challenge of correcting the problem changes. So why?
-
output.log
20/1 06:34 [4539] - info: [plugins/spam-be-gone] Settings loaded 20/1 06:34 [1303] - info: [plugins/spam-be-gone] Settings loaded 20/1 06:34 [4539] - error: /templates/alert.tpl Error: ENOENT, open '/home/yasin/nodebb/public/templates/404.tpl' Error: ENOENT, open '/home/yasin/nodebb/public/templates/500.tpl' 20/1 06:34 [1303] - error: /templates/alert.tpl Error: ENOENT, open '/home/yasin/nodebb/public/templates/alert.tpl' 20/1 06:34 [1303] - error: /templates/alert.tpl Error: ENOENT, open '/home/yasin/nodebb/public/templates/alert.tpl' Error: Failed to lookup view "500" in views directory "/home/yasin/nodebb/public/templates" at EventEmitter.render (/home/yasin/nodebb/node_modules/express/lib/application.js:579:17) at ServerResponse.render (/home/yasin/nodebb/node_modules/express/lib/response.js:961:7) at ServerResponse.res.render (/home/yasin/nodebb/src/middleware/render.js:52:11) at /home/yasin/nodebb/src/routes/index.js:199:9 at /home/yasin/nodebb/src/middleware/header.js:36:13 at /home/yasin/nodebb/node_modules/async/lib/async.js:726:13 at /home/yasin/nodebb/node_modules/async/lib/async.js:52:16 at done (/home/yasin/nodebb/node_modules/async/lib/async.js:241:17) at /home/yasin/nodebb/node_modules/async/lib/async.js:44:16 at /home/yasin/nodebb/node_modules/async/lib/async.js:723:17 Error: Failed to lookup view "500" in views directory "/home/yasin/nodebb/public/templates" at EventEmitter.render (/home/yasin/nodebb/node_modules/express/lib/application.js:579:17) at ServerResponse.render (/home/yasin/nodebb/node_modules/express/lib/response.js:961:7) at ServerResponse.res.render (/home/yasin/nodebb/src/middleware/render.js:52:11) at /home/yasin/nodebb/src/routes/index.js:199:9 at /home/yasin/nodebb/src/middleware/header.js:36:13 at /home/yasin/nodebb/node_modules/async/lib/async.js:726:13 at /home/yasin/nodebb/node_modules/async/lib/async.js:52:16 at done (/home/yasin/nodebb/node_modules/async/lib/async.js:241:17) at /home/yasin/nodebb/node_modules/async/lib/async.js:44:16 at /home/yasin/nodebb/node_modules/async/lib/async.js:723:17 20/1 06:34 [1303] - error: /templates/alert.tpl Error: ENOENT, open '/home/yasin/nodebb/public/templates/404.tpl' 20/1 06:34 [1303] - error: /templates/alert.tpl Error: ENOENT, open '/home/yasin/nodebb/public/templates/404.tpl' 20/1 06:34 [4539] - error: /admin/general/dashboard Error: ENOENT, open '/home/yasin/nodebb/public/templates/admin/footer.tpl' Error: ENOENT, open '/home/yasin/nodebb/public/templates/500.tpl' Error: Failed to lookup view "500" in views directory "/home/yasin/nodebb/public/templates" at EventEmitter.render (/home/yasin/nodebb/node_modules/express/lib/application.js:579:17) at ServerResponse.render (/home/yasin/nodebb/node_modules/express/lib/response.js:961:7) at ServerResponse.res.render (/home/yasin/nodebb/src/middleware/render.js:52:11) at /home/yasin/nodebb/src/routes/index.js:199:9 at /home/yasin/nodebb/src/middleware/header.js:36:13 at /home/yasin/nodebb/node_modules/async/lib/async.js:726:13 at /home/yasin/nodebb/node_modules/async/lib/async.js:52:16 at done (/home/yasin/nodebb/node_modules/async/lib/async.js:241:17) at /home/yasin/nodebb/node_modules/async/lib/async.js:44:16 at /home/yasin/nodebb/node_modules/async/lib/async.js:723:17 Error: Failed to lookup view "500" in views directory "/home/yasin/nodebb/public/templates" at EventEmitter.render (/home/yasin/nodebb/node_modules/express/lib/application.js:579:17) at ServerResponse.render (/home/yasin/nodebb/node_modules/express/lib/response.js:961:7) at ServerResponse.res.render (/home/yasin/nodebb/src/middleware/render.js:52:11) at /home/yasin/nodebb/src/routes/index.js:199:9 at /home/yasin/nodebb/src/middleware/header.js:36:13 at /home/yasin/nodebb/node_modules/async/lib/async.js:726:13 at /home/yasin/nodebb/node_modules/async/lib/async.js:52:16 at done (/home/yasin/nodebb/node_modules/async/lib/async.js:241:17) at /home/yasin/nodebb/node_modules/async/lib/async.js:44:16 at /home/yasin/nodebb/node_modules/async/lib/async.js:723:17 20/1 06:34 [1303] - error: TypeError: Cannot read property 'bootswatchSkin' of undefined at /home/yasin/nodebb/src/middleware/header.js:103:25 at /home/yasin/nodebb/node_modules/async/lib/async.js:726:13 at /home/yasin/nodebb/node_modules/async/lib/async.js:52:16 at async.forEachOf.async.eachOf (/home/yasin/nodebb/node_modules/async/lib/async.js:236:30) at _parallel (/home/yasin/nodebb/node_modules/async/lib/async.js:717:9) at Object.async.parallel (/home/yasin/nodebb/node_modules/async/lib/async.js:731:9) at middleware.renderHeader (/home/yasin/nodebb/src/middleware/header.js:69:9) at /home/yasin/nodebb/src/middleware/render.js:67:6 at /home/yasin/nodebb/node_modules/templates.js/lib/templates.js:168:12 at fs.js:271:14 TypeError: Cannot read property 'bootswatchSkin' of undefined at /home/yasin/nodebb/src/middleware/header.js:103:25 at /home/yasin/nodebb/node_modules/async/lib/async.js:726:13 at /home/yasin/nodebb/node_modules/async/lib/async.js:52:16 at async.forEachOf.async.eachOf (/home/yasin/nodebb/node_modules/async/lib/async.js:236:30) at _parallel (/home/yasin/nodebb/node_modules/async/lib/async.js:717:9) at Object.async.parallel (/home/yasin/nodebb/node_modules/async/lib/async.js:731:9) at middleware.renderHeader (/home/yasin/nodebb/src/middleware/header.js:69:9) at /home/yasin/nodebb/src/middleware/render.js:67:6 at /home/yasin/nodebb/node_modules/templates.js/lib/templates.js:168:12 at fs.js:271:14
-
@nhl.pl said:
Error: ENOENT, open means permission problem. NodeBB can't read file.
You have a problem with a theme. It could be also something on npm level or even operating system level.
Please always make backups and use them in such critical situation.
I made changes to fix the problems in the above file. I could not understand the reason for the improvement
Copyright © 2024 NodeBB | Contributors