vim find out what is changing the directory - vim

I usually start vim from the folder where I have my Makefile and tags file
and edit a file that is two levels down the three.
So if I am at folder x I usually would do vim x1/x2/code.c
The problem is that recently vim changes the folder to the folder where the code is (so if I do pwd it will show x1/x2).
I want it to stay at the top folder.
Is there a way of knowing what is causing the change of folder? I am assuming that is some kind of plugin but have not been able to track it down.
Thanks.

Check if you have autochdir turned on in your vimrc. :set autochdir? to check.
There are any number of plugins that could be doing it, do you happen to remember what you've installed recently?

This is the request for the Benoit answer. (I am not sure if I should post it as an answer or edit the question).
1: .vimrc
2: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/syntax/syntax.vim
3: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/syntax/synload.vim
4: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/syntax/syncolor.vim
5: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/filetype.vim
6: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/ftplugin.vim
7: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/indent.vim
8: .vim/colors/graywh_cs.vim
9: .vim/plugin/AlignMapsPlugin.vim
10: .vim/plugin/AlignPlugin.vim
11: .vim/plugin/ColorSchemes.vim
12: .vim/plugin/NERD_commenter.vim
13: .vim/plugin/NERD_tree.vim
14: .vim/plugin/SyntaxFolds.vim
15: .vim/plugin/a.vim
16: .vim/plugin/ack.vim
17: .vim/plugin/bufexplorer.vim
18: .vim/plugin/buftabs.vim
19: .vim/plugin/c.vim
20: .vim/plugin/cecutil.vim
21: .vim/plugin/changeColorScheme.vim
22: .vim/plugin/conque_term.vim
23: .vim/plugin/crefvim.vim
24: .vim/plugin/cscope_maps.vim
25: .vim/plugin/d/ColorSchemeMenuMaker.vim
26: .vim/plugin/d/ColorSchemes.vim
27: .vim/plugin/d/filebrowser.vim
28: .vim/plugin/d/libList.vim
29: .vim/plugin/echofunc.vim
30: .vim/plugin/filebrowser.vim
31: .vim/plugin/fuf.vim
32: .vim/autoload/fuf/buffer.vim
33: .vim/autoload/fuf.vim
34: .vim/autoload/fuf/file.vim
35: .vim/autoload/fuf/dir.vim
36: .vim/autoload/fuf/bookmark.vim
37: .vim/autoload/fuf/tag.vim
38: .vim/autoload/fuf/taggedfile.vim
39: .vim/autoload/fuf/jumplist.vim
40: .vim/autoload/fuf/changelist.vim
41: .vim/autoload/fuf/quickfix.vim
42: .vim/autoload/fuf/line.vim
43: .vim/autoload/fuf/help.vim
44: .vim/autoload/fuf/givenfile.vim
45: .vim/autoload/fuf/givendir.vim
46: .vim/autoload/fuf/givencmd.vim
47: .vim/autoload/fuf/callbackfile.vim
48: .vim/autoload/fuf/callbackitem.vim
49: .vim/plugin/imaps.vim
50: .vim/plugin/libList.vim
51: .vim/plugin/lightWeightArray.vim
52: .vim/plugin/matchit.vim
53: .vim/plugin/mru.vim
54: .vim/plugin/outlinetoggle.vim
55: .vim/plugin/remoteOpen.vim
56: .vim/plugin/scratch.vim
57: .vim/plugin/snipMate.vim
58: .vim/plugin/srcexpl.vim
59: .vim/plugin/supertab.vim
60: .vim/plugin/swap_parameters.vim
61: .vim/plugin/taglist.vim
62: .vim/plugin/timestamp.vim
63: .vim/plugin/totd.vim
64: .vim/plugin/ttcplug.vim
65: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/plugin/getscriptPlugin.vim
66: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/plugin/gzip.vim
67: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/plugin/matchparen.vim
68: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/plugin/netrwPlugin.vim
69: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/plugin/rrhelper.vim
70: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/plugin/spellfile.vim
71: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/plugin/tarPlugin.vim
72: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/plugin/tohtml.vim
73: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/plugin/vimballPlugin.vim
74: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/plugin/zipPlugin.vim
75: .vim/after/plugin/snipMate.vim
76: .vim/nerdtree_plugin/exec_menuitem.vim
77: .vim/nerdtree_plugin/fs_menu.vim
78: temp/MyInstalls/linux/Packages/vim73/share/vim/vim73/scripts.vim

Related

Cannot clone box64

I want to install box64 on my raspberry pi 4b but i always get this "not found" message although this repo is available. Anyone knows why? (OS: 64 Bit Raspberry Lite)
pi#raspberry:~ $ git clone https://github.com/ptitSeb/box64.git
Cloning into 'box64'...
/usr/lib/git-core/git-remote-https: 1: 2526fc26bdbcb46c18435ed08: not found
/usr/lib/git-core/git-remote-https: 2: Description-en:: not found
/usr/lib/git-core/git-remote-https: 3: library: not found
/usr/lib/git-core/git-remote-https: 4: be: not found
/usr/lib/git-core/git-remote-https: 6: Package:: not found
/usr/lib/git-core/git-remote-https: 7: Description-md5:: not found
/usr/lib/git-core/git-remote-https: 8: Description-en:: not found
/usr/lib/git-core/git-remote-https: 9: library: not found
/usr/lib/git-core/git-remote-https: 10: be: not found
/usr/lib/git-core/git-remote-https: 12: Package:: not found
/usr/lib/git-core/git-remote-https: 13: Description-md5:: not found
/usr/lib/git-core/git-remote-https: 14: Description-en:: not found
/usr/lib/git-core/git-remote-https: 15: FFmpeg: not found
/usr/lib/git-core/git-remote-https: 16: mux,: not found
/usr/lib/git-core/git-remote-https: 17: machines: not found
/usr/lib/git-core/git-remote-https: 18: cutting: not found
/usr/lib/git-core/git-remote-https: 20: This: not found
/usr/lib/git-core/git-remote-https: 21: contains: not found
/usr/lib/git-core/git-remote-https: 22: and: not found
/usr/lib/git-core/git-remote-https: 24: The: not found
/usr/lib/git-core/git-remote-https: 25: to: not found
/usr/lib/git-core/git-remote-https: 26: codecs: not found
/usr/lib/git-core/git-remote-https: 28: This: not found
/usr/lib/git-core/git-remote-https: 30: Package:: not found
/usr/lib/git-core/git-remote-https: 31: Description-md5:: not found
/usr/lib/git-core/git-remote-https: 32: Syntax error: "(" unexpected

wasm code commit Allocation failed - process out of memory

I have a nodejs script which was working fine on nodejs 12. I got a new macbook air on which I installed nodejs LTS 14. The scripts was not working as intended so I have downgraded it to nodejs 12 LTS. Now I'm getting an error for process out of memory. I have also tried using --max-oud-size to increase the memory allocation.
export NODE_OPTIONS=--max_old_space_size=4096
It didn't work. Following is the stack trace for the error
<--- Last few GCs --->
[8193:0x150008000] 41 ms: Scavenge 2.9 (4.9) -> 2.7 (5.7) MB, 0.5 / 0.0 ms (average mu = 1.000, current mu = 1.000) allocation failure
[8193:0x150008000] 54 ms: Scavenge 3.9 (5.9) -> 3.6 (8.6) MB, 0.3 / 0.0 ms (average mu = 1.000, current mu = 1.000) allocation failure
[8193:0x150008000] 59 ms: Scavenge 5.2 (8.6) -> 3.9 (9.1) MB, 0.2 / 0.0 ms (average mu = 1.000, current mu = 1.000) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x00010b1808d1 <JSObject>
0: builtin exit frame: new constructor(aka Module)(this=0x000102ea1961 <Object map = 0x10b3ecbc9>,0x000102ea1811 <Uint8Array map = 0x102fc2b99>,0x000102ea1961 <Object map = 0x10b3ecbc9>)
1: ConstructFrame [pc: 0x100ca8758]
2: StubFrame [pc: 0x100d91204]
3: /* anonymous */ [0x102ea10b1] [/Applications/XAMPP/xamppfiles/htdocs/web-dev/local-cron-jobs/node_modules/long/src/long.js:9...
FATAL ERROR: wasm code commit Allocation failed - process out of memory
1: 0x1004db324 node::Abort() [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
2: 0x1004db4a4 node::errors::TryCatchScope::~TryCatchScope() [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
3: 0x1005fab78 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
4: 0x1005fab0c v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
5: 0x100b332bc v8::internal::wasm::WasmCodeAllocator::AllocateForCodeInRegion(v8::internal::wasm::NativeModule*, unsigned long, v8::base::AddressRegion) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
6: 0x100b34198 v8::internal::wasm::NativeModule::CreateEmptyJumpTableInRegion(unsigned int, v8::base::AddressRegion) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
7: 0x100b33660 v8::internal::wasm::NativeModule::AddCodeSpace(v8::base::AddressRegion) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
8: 0x100b33fd4 v8::internal::wasm::NativeModule::NativeModule(v8::internal::wasm::WasmEngine*, v8::internal::wasm::WasmFeatures const&, bool, v8::internal::VirtualMemory, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>, std::__1::shared_ptr<v8::internal::Counters>, std::__1::shared_ptr<v8::internal::wasm::NativeModule>*) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
9: 0x100b36214 v8::internal::wasm::WasmCodeManager::NewNativeModule(v8::internal::wasm::WasmEngine*, v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&, unsigned long, bool, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
10: 0x100b3cb1c v8::internal::wasm::WasmEngine::NewNativeModule(v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&, unsigned long, bool, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
11: 0x100b3ca64 v8::internal::wasm::WasmEngine::NewNativeModule(v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
12: 0x100b14578 v8::internal::wasm::CompileToNativeModule(v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&, v8::internal::wasm::ErrorThrower*, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>, v8::internal::wasm::ModuleWireBytes const&, v8::internal::Handle<v8::internal::FixedArray>*) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
13: 0x100b3a710 v8::internal::wasm::WasmEngine::SyncCompile(v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&, v8::internal::wasm::ErrorThrower*, v8::internal::wasm::ModuleWireBytes const&) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
14: 0x100b5bc98 v8::(anonymous namespace)::WebAssemblyModule(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
15: 0x10065f150 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
16: 0x10065e4b8 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
17: 0x10065dfb4 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
18: 0x100d2b0cc Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
19: 0x100ca8758 Builtins_JSBuiltinsConstructStub [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
20: 0x100d91204 Builtins_ConstructHandler [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
21: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
22: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
23: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
24: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
25: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
26: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
27: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
28: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
29: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
30: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
31: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
32: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
33: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
34: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
35: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
36: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
37: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
38: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
39: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
40: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
41: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
42: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
43: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
44: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
45: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
46: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
47: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
48: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
49: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
50: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
51: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
52: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
53: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
54: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
55: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
56: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
57: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
58: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
59: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
60: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
61: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
62: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
63: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
64: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
65: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
66: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
67: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
68: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
69: 0x100cad520 Builtins_InterpreterEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
70: 0x100caa5a8 Builtins_JSEntryTrampoline [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
71: 0x100caa24c Builtins_JSEntry [/Users/rahulbharati/.nvm/versions/node/v12.20.1/bin/node]
72: 0x150008000 ```
Any help appreciated. Thanks.
Currently, node on M1 macOS doesn't work well except node#15.
If you using node#12 built on arm64 architecture, it may be crashed on some scripts such as https://github.com/dcodeIO/long.js.git
You can check it if you run test cases in long.js repository.
If you would like to know on which your node is built, please follow this:
$ node
Welcome to Node.js v12.21.0.
Type ".help" for more information.
>
> process.arch
'arm64'
The above example means the node binary is built for arm64 architecture (Apple Silicon M1 chip). If node is run on rosetta2, it will display 'x64'.
I have tested some test cases in long.js and node.js source repository.
Node#15 for arm64: no problem
Node#12 for arm64: some errors in long.js and node.js test cases
Node#12 for x64: no problem
As I know, node#12 for arm64 works well for some scripts, but some scripts has been crashed such as long.js.
Edit
On June 21th, 2021, node#14 on Homebrew has passed long.js test cases for arm64. (v14.17.1)
Of course, node#16 also supports it.
But, node#12 still has errors on them. (v12.22.1)
This issue has been fixed in Node 15.3.0.
I updated mine and it worked fine for me.
Can't upgrade node & need a quick two minute solution?
For anyone who is on an M1 computer and suffering from this issue and cannot upgrade their node version for whatever the reason may be, there is still a quick & easy workaround:
Go to your Application/Utilities folder where your Terminal resides. (An easy way to find this is right click on your terminal icon and click "Open in finder".) Here is a screenshot:
Right click on terminal and click "Duplicate" and then rename the new terminal to something like "Rosetta-Terminal". (Bottom left in the screenshot above.)
Right click on Rosetta-Terminal --> "Get Info" --> select "Open using Rosetta".
Now open the Rosetta-Terminal and using nvm type nvm uninstall YOUR.VERSION.HERE. (Note: it may say that it's unable to install it since you're currently using it, in which case just install any other version temporarily and use that.) If you do not have nvm then you can install it here or by running: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash.
nvm install YOUR.VERSION.HERE
Boom, now your node is installed under Rosetta and it should work fine without the need to upgrade your node version.
Rosetta is Apple's way of allowing apps built for the Intel chip to work with Apple Silicon.
It's not always easy to upgrade your node version as other answers seem to suggest. For example perhaps you have other dependencies that require a specific node version and upgrading those dependencies would require a significant lift and shift of your app - luckily for those scenarios we have Rosetta.
This code block was able to get me past this frustrating error:
$ nvm uninstall 14
$ arch -x86_64 zsh
$ nvm install 14
$ nvm alias default 14
Consider replacing 14 above with whichever node version you are attempting to run under.
After installing, you can run node followed process.arch to confirm that node is running in x64 mode:
$ node
> process.arch
'x64'
You will then need to delete your node modules from your project folder (rm -rf node_modules) and run npm i again.
Using NVM installed from Github on M1.
Was running v14.x
nvm install 15.3
Compile took around 10 mins.
Works now.
I was getting this error with the node version v14.
To resolve this, I installed NVM(node version manager). With the help of this, I was able to install the latest version of the node i.e. v15. After installing the latest version, I didn't get any errors. Also, with node version manager(NVM), one can easily change versions of node ,if needed for a certain project. That can be really helpful at times.
Good Luck !
I was able to fix the crash with v14.16.0 by applying the changes of this pull request as a patch when compiling node.
To simplify this I've created a gist with the patch.
With node-build / nodenv
Installation commands:
curl -LO https://gist.githubusercontent.com/koenpunt/812953470f26b100845e2b37e1288067/raw/667daea235ac99236adb2dfa1499401358d004dd/node-14.16.0.patch
node-build -p 14.16.0 $(nodenv root)/versions/14.16.0 < node-14.16.0.patch
When not using nodenv, you should replace $(nodenv root)/versions/14.16.0 with the path where you want to install node.
Without node-build
When not using node-build you should be able to apply the patch to the source yourself using git-apply:
git apply node-14.16.0.patch
Or using the patch command:
patch -p1 < node-14.16.0.patch

Angular build causing an error.- FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

When I am trying to execute
ng build my.sample.application --prod=false --configuration=dev
I get the error shown below. To overcome this issue I have executed
node --max_old_space_size=15000
command too but the issue still persists.
Error
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF6F564094F napi_wrap+124431
2: 00007FF6F55E2696 v8::base::CPU::has_sse+34502
3: 00007FF6F55E3356 v8::base::CPU::has_sse+37766
4: 00007FF6F5DE6F4E v8::Isolate::ReportExternalAllocationLimitReached+94
5: 00007FF6F5DCEF91 v8::SharedArrayBuffer::Externalize+833
6: 00007FF6F5C9C85C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436
7: 00007FF6F5CA7C00 v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312
8: 00007FF6F5CA4734 v8::internal::Heap::PageFlagsAreConsistent+3204
9: 00007FF6F5C99FC3 v8::internal::Heap::CollectGarbage+1283
10: 00007FF6F5C98794 v8::internal::Heap::AddRetainedMap+2356
11: 00007FF6F5CC0787 v8::internal::Factory::NewRawTwoByteString+87
12: 00007FF6F5AE797C v8::internal::String::SlowFlatten+492
13: 00007FF6F59B110F unibrow::Utf8::EncodeOneByte+687
14: 00007FF6F5DF13A6 v8::String::Utf8Length+22
15: 00007FF6F55FCE0C v8::internal::Malloced::operator delete+14476
16: 00007FF6F5D9B150 v8::internal::Builtins::builtin_handle+325536
17: 00007FF6F5D9A697 v8::internal::Builtins::builtin_handle+322791
18: 00007FF6F5D9A9D8 v8::internal::Builtins::builtin_handle+323624
19: 00007FF6F5D9A7DE v8::internal::Builtins::builtin_handle+323118
20: 00007FF6F6212D6D v8::internal::SetupIsolateDelegate::SetupHeap+568205
21: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
22: 00007FF6F618BBAC v8::internal::SetupIsolateDelegate::SetupHeap+14796
23: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
24: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
25: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
26: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
27: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
28: 00007FF6F618BBAC v8::internal::SetupIsolateDelegate::SetupHeap+14796
29: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
30: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
31: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
32: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
33: 00007FF6F618BBAC v8::internal::SetupIsolateDelegate::SetupHeap+14796
34: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
35: 00007FF6F618BBAC v8::internal::SetupIsolateDelegate::SetupHeap+14796
36: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
37: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
38: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
39: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
40: 00007FF6F61927FC v8::internal::SetupIsolateDelegate::SetupHeap+42524
41: 00007FF6F618BBAC v8::internal::SetupIsolateDelegate::SetupHeap+14796
42: 00007FF6F618FDB1 v8::internal::SetupIsolateDelegate::SetupHeap+31697
43: 00007FF6F618F99C v8::internal::SetupIsolateDelegate::SetupHeap+30652
44: 00007FF6F5CF4F43 v8::internal::Execution::CallWasm+1395
45: 00007FF6F5CF48C6 v8::internal::Execution::Call+182
46: 00007FF6F5DC5B3B v8::Function::Call+603
47: 00007FF6F565CA45 node::CallbackScope::~CallbackScope+1429
48: 00007FF6F5655FE3 v8::internal::interpreter::BytecodeNode::operand_scale+179
49: 00007FF6F55DFBB3 v8::base::CPU::has_sse+23523
50: 00007FF6F55D4FE1 EVP_CIPHER_CTX_buf_noconst+200753
51: 00007FF6F568CFC7 uv_timer_stop+775
52: 00007FF6F5689AAB uv_async_send+331
53: 00007FF6F568924C uv_loop_init+1212
54: 00007FF6F5689414 uv_run+244
55: 00007FF6F55AB892 EVP_CIPHER_CTX_buf_noconst+30946
56: 00007FF6F5609263 node::Start+275
57: 00007FF6F54C666C RC4_options+339308
58: 00007FF6F62C5D58 v8::internal::SetupIsolateDelegate::SetupHeap+1301368
59: 00007FFB974A13D2 BaseThreadInitThunk+34
60: 00007FFB977654F4 RtlUserThreadStart+52
npm ERR! Windows_NT 6.3.9600
Could you guys please help me?
use
"build:prod": "node --max_old_space_size=8000 ./node_modules/#angular/cli/bin/ng build --configuration=prod", in your package.json file
1
this will tell node to exceed default memory allocation by given size in command.
I had the same issue compiling Angular 10, however in my case the issue was an incorrect version of node. My node version was 10.15.1 and once I switched back to node version 13.14.0 the issue was resolved. I use nvm (Node Version Manager) to switch between versions of node so I can still run Angular 7/8 projects and forgot to switch it back.
Hope this helps someone with the same issue!
I came acorss similar issue
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
in Package.json
--max_old_space_size=4096 should not exceed your RAM memory, this is causing this error I guess.
"scripts": {
"ng": "ng",
"start": "node --max_old_space_size=4096 node_modules/#angular/cli/bin/ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "node --max_old_space_size=4096 node_modules/#angular/cli/bin/ng build --prod --stats-json && webpack-bundle-analyzer dist/stats.json",
"rtl": "webpack",
},

How do I get Vim to source my .vimrc directly?

I want to remove the color inverting from <i></i> elements. I added the line highlight htmlItalic ctermbg=NONE to my .vimrc, but when I load multiple files, say file1.html and file2.html, the <i></i> won't have inverted colors. However, if I type :bn :bn to go to the next buffer then back, the <i></i> will be inverted again. I must type :source ~/.vimrc to change it back. How do I stop this?
The result of scriptnames is:
1: ~/.vimrc
2: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/syntax/syntax.vim
3: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/syntax/synload.vim
4: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/syntax/syncolor.vim
5: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/filetype.vim
6: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/colors/zellner.vim
7: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/ftoff.vim
8: ~/.vim/bundle/vundle/autoload/vundle.vim
9: ~/.vim/bundle/vundle/autoload/vundle/config.vim
10: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/ftplugin.vim
11: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/indent.vim
12: ~/.vim/plugin/RltvNmbr.vim
13: ~/.vim/autoload/RltvNmbr.vim
14: ~/.vim/plugin/RltvNmbrPlugin.vim
15: ~/.vim/bundle/auto-pairs/plugin/auto-pairs.vim
16: ~/.vim/bundle/nerdcommenter/plugin/NERD_commenter.vim
17: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/getscriptPlugin.vim
18: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/gzip.vim
19: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/logiPat.vim
20: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/manpager.vim
21: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/matchparen.vim
22: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/netrwPlugin.vim
23: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/rrhelper.vim
24: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/spellfile.vim
25: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/tarPlugin.vim
26: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/tohtml.vim
27: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/vimballPlugin.vim
28: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/plugin/zipPlugin.vim
29: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/scripts.vim
30: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/syntax/vim.vim
31: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/syntax/perl.vim
32: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/syntax/pod.vim
33: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/syntax/ruby.vim
34: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/syntax/python.vim
35: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/ftplugin/vim.vim
36: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/indent/vim.vim
37: /usr/local/Cellar/vim/7.4.1864_1/share/vim/vim74/syntax/nosyntax.vim
I am on the latest version of vim via. Homebrew, and am NOT using gvim.
Thanks!

When I try to use vim character command f with a python file, it says no fold found

I want to use the f command (to go to next occurence of a character) in a python file but somehow this is masked by code folding function.
:set nofoldenable doesn't work.
These options are in my .vimrc:
filetype off
filetype plugin indent on
syntax on
Does someone know which plug-in causes this behavior and how I can toggle between the two functionalities?
Here is the output of :scriptnames
1: ~/.vimrc
2: /usr/local/share/vim/vim74/ftoff.vim
3: /usr/local/share/vim/vim74/filetype.vim
4: /usr/local/share/vim/vim74/ftplugin.vim
5: /usr/local/share/vim/vim74/indent.vim
6: /usr/local/share/vim/vim74/syntax/syntax.vim
7: /usr/local/share/vim/vim74/syntax/synload.vim
8: /usr/local/share/vim/vim74/syntax/syncolor.vim
9: ~/.vim/autoload/pathogen.vim
10: ~/.vim/bundle/SWTC.vim/plugin/SWTC.vim
11: ~/.vim/bundle/SWTC.vim/plugin/rng.vim
12: ~/.vim/bundle/jedi-vim/plugin/jedi.vim
13: ~/.vim/bundle/jedi-vim/autoload/jedi.vim
14: ~/.vim/bundle/syntastic/plugin/syntastic/autoloclist.vim
15: ~/.vim/bundle/syntastic/plugin/syntastic/balloons.vim
16: ~/.vim/bundle/syntastic/plugin/syntastic/checker.vim
17: ~/.vim/bundle/syntastic/plugin/syntastic/cursor.vim
18: ~/.vim/bundle/syntastic/plugin/syntastic/highlighting.vim
19: ~/.vim/bundle/syntastic/plugin/syntastic/loclist.vim
20: ~/.vim/bundle/syntastic/plugin/syntastic/modemap.vim
21: ~/.vim/bundle/syntastic/plugin/syntastic/notifiers.vim
22: ~/.vim/bundle/syntastic/plugin/syntastic/registry.vim
23: ~/.vim/bundle/syntastic/plugin/syntastic/signs.vim
24: ~/.vim/bundle/syntastic/plugin/syntastic.vim
25: ~/.vim/bundle/syntastic/autoload/syntastic/util.vim
26: ~/.vim/bundle/vim-show-whitespace/plugin/showwhite.vim
27: ~/.vim/bundle/vim-surround/plugin/surround.vim
28: /usr/local/share/vim/vim74/plugin/getscriptPlugin.vim
29: /usr/local/share/vim/vim74/plugin/gzip.vim
30: /usr/local/share/vim/vim74/plugin/matchparen.vim
31: /usr/local/share/vim/vim74/plugin/netrwPlugin.vim
Run the map f command to see if there's a mapping for the f key.
If there is such a mapping, you can see which configuration file mapped the key by running verbose map f. It should report something like:
Last set from ~/.vim/some-plugin.vim

Resources