Ошибка:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Решение:
node --max_old_space_size=2000000
Источник:
Локальная копия:
Ошибка:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Решение:
node --max_old_space_size=2000000
Источник:
Локальная копия:
nullnullnunlnununnuulll
JSON.stringify(value,null,4)
nil JSON JOSN JSOSH
json_encode(array(
"data_source" => DATA_SOURCE, "description" => DESCRIPTION,
), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!
Симптомы: При попытке обновить package возникает вот эта хуйня.
Лечение: обновить npm. Несколько раз с разными флагами и из-под разных версий node, желательно из-под самой последней, а то бывают привиреды.
fs.exists() is an anachronism and exists only for historical reasons. There should almost never be a reason to use it in your own code.
In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to fs.exists() and fs.open(). Just open the file and handle the error when it's not there.
Ошибка: нодефтп не копирует файлы
@client.get(
sourcePath,
false,
(err,stream) =>
if err?
resultCallback err
else
@client.put(
stream,
destinationPath,
false,
(err) ->
if err?
resultCallback err
else
resultCallback null
)
)
Причина: line 1014 of connection.js
} else {
input.pipe(dest);
input.resume();
}
input.pipe НЕ РАБОТАЕТ ПОТОМУЧТО СТРИМЫ В НОДЕ СЛОМАНЫ НАХУЙ И СОСЕДИ ЗА СТЕНКОЙ ГОЛОВОЙ О СТЕНКУ БЬЮТСЯ, ДЕБИЛЫ, ПОБЕДИТЕЛИ В НОМИНАЦИИ КУРИНЫЕ МОЗГИ 2014
Решение:
Заплатить мне три тысячи долларов, чтобы я пришёл и все исправил.
Причина в том, что в
new Buffer(str,'base64')
typeof str == 'undefined' // true
Пытался создать директорию внутри несуществующей директории. Решение: рекурсивно создавать по одной директории вплоть до самого конца.
fs.mkdir '/home/user/UNEXISTENT/UNEXISTENT'
Why the fuck? Why the fucking module cannot be fucking required? Why all fucking advices on fucking internets doesn't help? How to fucking make npm install modules to the fucking where node will search for it while require? The fuck is this?
I'm probably have an answer to your question. Well, you see, I decided once to create my own new npm module. So I created a folder ~/tst/my-fucking-module, put package.js into that fucking directory, put there some code and then typed in console
~/tst/my-fucking-module$ npm install .
~/tst/my-fucking-module$ npm install . -g
~/tst/my-fucking-module$ sudo npm install .
~/tst/my-fucking-module$ sudo npm install -g .
~/tst/my-fucking-module$ sudo npm install -g --verbose .
~/tst/my-fucking-module$ sudo fuck you you fucking bitch fuck you fuck you fucking fuck fuck fuck fuck die moron I hate you so fucking much
with no luck. Whenever I tried to run node test.js it printed in console
Error: Cannot find module 'my-fucking-module'
Guess fucking what? The problem was because my console `pwd` was teh ~/tst/my-fucking-module
~/tst/my-fucking-module$ cd ..
~/tst$ npm install my-fucking-module
would work because some degenerate decided that if I cd'ed into directory that has 'package.js' file inside it, it would be COOL AND FUCKING FUNNNY LULZ KEKEKE to install all packages into ~/tst/my-fucking-module/node_modules instead of ~/node_modules and OFC "that stupid node" would not go to ~/tst/fucking-package-folder/node_modules to search for it because it wasn't written by morons!
Fuck that shit. Really. Fuck that fucking shit. Why would you ever need to install your fucking modules inside of the fucking package? Why? Add some shitty key for this you fucking moron! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fukc...
FUCK. FUCK YOU, I'LL BECOME AN ALCOHOLIC BECAUSE OF SHIT LIKE THIS.
That's all folks.
Actually, it's bad to swear on that good people that bring us all those things like javascript, nodejs, nvm and even npm. So, please, go to your personal blog or stackoverflow and write a good polite detailed article about how to fix this. You didn't saw this post. Ok?
sudo npm install -g git+https://git@github.com/alubbe/coffee-script.git
Код ведёт себя настолько непредсказуемо, что после очередного выполнения, хочется в него просто плюнуть.