Error in kniting Rmarkdown.

Error in namespaceExport(ns, exports) : 
  undefined exports: Sweave2knitr, all_labels, all_patterns, all_rcpp_labels, asis_output, cache_engines, clean_cache, combine_words, current_input, dep_auto, dep_prev, engine_output, extract_raw_output, fig_chunk, fig_path, hook_ffmpeg_html, hook_gifski, hook_mogrify, hook_movecode, hook_optipng, hook_pdfcrop, hook_plot_asciidoc, hook_plot_custom, hook_plot_html, hook_plot_md, hook_plot_rst, hook_plot_tex, hook_plot_textile, hook_pngquant, hook_purl, hook_r2swf, hook_scianimator, image_uri, imgur_upload, include_app, include_graphics, include_url, inline_expr, is_html_output, is_latex_output, kable, kables, knit, knit2html, knit2pandoc, knit2pdf, knit2wp, knit_child, knit_code, knit_engines, knit_exit, knit_expand, knit_filter, knit_global, knit_hooks, knit_meta, knit_meta_add, knit_params, knit_params_yaml, knit_patterns, knit_print, knit_rd, knit_rd_all, knit_theme, knit_watch, load_cache, normal_print, opts_chunk, opts_current, opts_hooks, opts_knit, opts_template, pandoc, 
Calls: :: ... namespaceImportFrom -> asNamespace -> loadNamespace -> namespaceExport
In addition: Warning messages:
1: In loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
  package 'knitr' has no 'package.rds' in Meta/
2: S3 methods '$.knitr_strict_list', 'knit_print.default', 'knit_print.knit_asis', 'knit_print.knitr_kable', 'print.knitr_kable', 'process_group.block', 'process_group.inline', 'process_tangle.block', 'process_tangle.inline', 'wrap.character', 'wrap.default', 'wrap.error', 'wrap.html_screenshot', 'wrap.knit_asis', 'wrap.knit_embed_url', 'wrap.knit_image_paths', 'wrap.list', 'wrap.message', 'wrap.recordedplot', 'wrap.source', 'wrap.warning' were declared in NAMESPACE but not found 
Execution halted

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one: FAQ: How to do a minimal reproducible example ( reprex ) for beginners

Error in namespaceExport(ns, exports): undefined exports, There might be a number of ways to generate this error (hence a minimal reprex would be helpful), but I think fundamentally this message occurs when you try to export an object that doesn't exist. That is, the package NAMESPACE file contains the line "Sweave2knitr, all_labels," etc, but those objects don't exist. (stack overflow discussion there).
How you resolve the issue depends on how the error popped up. That stack overflow discussion walks through a few ways for it to have occurred.

Warnings 1 and 2 may be caused by the same issue or unrelated. Again, a minimal reprex would be helpful.

1 Like