Skip to content

Use of massive filenames results in build failure on windows due to exceeding the max filename path #1147

@ibrust

Description

@ibrust

As the title says. This is the error we get:
ninja: error: Stat(reactnativekeyboardcontroller_autolinked_build/CMakeFiles/react_codegen_reactnativekeyboardcontroller.dir/C_/Users/irust/connect/node_modules/react-native-keyboard-controller/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.cpp.o): Filename longer than 260 characters

That is the path generated by cmake. I'm aware there is a theoretical workaround to this, but implementing it a) just simply hasn't worked on my machine, b) may not be possible given the security constraints of the environment, c) can lead to rabbit holes of other problems, like ninja.exe not accepting certain command line arguments due to the version or for unknown reasons.

There is really no reason your filenames should be this long. You should just make them shorter and save people the hassle of having to deal with this.

Metadata

Metadata

Assignees

Labels

build error ❌Anything that triggers build errors and prevent this library from being usedsponsor 💖Someone pays money for the issue to be resolved 💸🤖 androidAndroid specific

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions