-
Notifications
You must be signed in to change notification settings - Fork 0
/
troubleshooting.html
73 lines (49 loc) · 4.77 KB
/
troubleshooting.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
layout: default
head_title: "LESK: Troubleshooting"
title: Troubleshooting
---
<div class="row">
<div class="12u">
<p>Below are some troubleshooting tips for problems that we have encountered and resolved:</p>
<h3>Blank page or HTTP 500 server error.</h3>
<p>Check the laravel log file (<code>storage/logs/laravel.log</code>) file for hints. If nothing new was added to the file that is a good hint in
itself. Next, check the Web server error log (<code>/var/log/httpd/error.log</code>) if you see a message such as this one:</p>
<blockquote>
<p>PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or
file "/.../.../storage/logs/laravel.log" could not be opened: failed to open stream: Permission
denied' in /.../.../vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:97</p>
</blockquote>
<p>Check the file permission on the laravel log file (<code>storage/logs/laravel.log</code>) it could be that the process
running your Web server does not have <code>write</code> permission to it.</p>
<h3>Node.js</h3>
<h4>Old version</h4>
<p>As pointed out by <a href="https://github.com/thassan">thassan</a> in <a href="https://github.com/sroutier/laravel-5.1-enterprise-starter-kit/issues/6">Issue 6</a>,
if your distribution or OS ships with an older version of Node.js the name of the executable may be 'nodejs'. In recent versions, the name has
been changed to 'node'. This will cause some Node.js packages to fail during the installation as they expect to find the 'node' executable.
To resolve this issue you can either create a symbolic link from the 'nodejs' executable to 'node', or you may want to consider installing
a more recent version of Node.js.
To create a symbolic link issue the command:</p>
<pre><code>sudo ln -s /usr/bin/nodejs /usr/bin/node</code></pre>
<h4>ENOENT error</h4>
<p>If the installation of Node.js packages fails with a 'ENOENT' error, you may need to create an empty file at the root of the project as
explained on <a href="http://stackoverflow.com/questions/17990647/npm-install-errors-with-error-enoent-chmod">Stack Overflow</a>.
To create the empty file run:</p>
<pre><code>touch .npmignore</code></pre>
<h4>Hangs</h4>
<p>If the installation of Node.js packages appears to hang, it may be due to a race condition that does not manifest itself when invoked
with the <code>-ddd</code> after having deleted the <code>node_modules</code> directory at the root of the project:</p>
<pre><code>rm -rf node_modules
npm install -ddd</code></pre>
<h3>Composer fails with a memory allocation error</h3>
<p>Due to the size of the dependency map generated by the composer.json file, the composer command may fail with a memory allocation error such as this one:</p>
<pre><code>PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 134217728 bytes)....
PHP Stack trace:
PHP 1. {main}() /usr/local/bin/composer:0
PHP 2. require() /usr/local/bin/composer:24
...</code></pre>
<p>The solution is to temporarily remove the memory limit for the composer command with a command such as this:</p>
<pre><code>php -d memory_limit=-1 /usr/local/bin/composer update tylercd100/lern</code></pre>
</div>
</div>
{% include footer.html prev_page="tips" prev_title="Tips" next_page="security" next_title="Security" %}