-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
link-assets command error #2568
Comments
hey @teivienn, what's the output of |
Hey @szymonrybczak
And I also created a repository to reproduce |
Can confirm that |
I did a little digging - This is likely expected. The original PR for the command
The subsequent commit removed this command from the entrypoint CLI package so it won't show up in the list as expected. For anyone in emergency, you can use the command with a simple patch to the
// ...
// L20
function _cliConfig() {
const data = require("@react-native-community/cli-config");
_cliConfig = function () {
return data;
};
return data;
}
+ function _cliLinkAssets() {
+ const data = require("@react-native-community/cli-link-assets");
+ _cliLinkAssets = function () {
+ return data;
+ };
+ return data;
+ }
var _init = _interopRequireDefault(require("./init"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- const projectCommands = [..._cliConfig().commands, _cliClean().commands.clean, _cliDoctor().commands.info];
+ const projectCommands = [..._cliConfig().commands, _cliClean().commands.clean, _cliDoctor().commands.info, _cliLinkAssets().commands.linkAssets];
// L38
// ... Then run
While this workaround works, the command is hidden for a reason. This is not the intended way to use it, and it's the best to hear from them about its latest state. Anyways, I appreciate the fantastic work done by fabioh8010 and the judicious decision from thymikee. |
@Nova41 Thanks you for the research I think it would be nice to put in the documentation about this command that it is hidden, or allow its users, but with a description of the nuances of it |
Environment
Description
I get the error “error: unknown command ‘link-assets’ when I try to execute the command
npx react-native link-assets
I followed this guide completely, but the command doesn't work for some reason.
I have the following packages installed
Reproducible Demo
Link to repository
The text was updated successfully, but these errors were encountered: