在构建所有格式时,insert_chapter_script(config,"在"之前)出错

时间:2017-10-07 07:11:55

标签: r r-markdown bookdown

安装最小的bookdown示例后,当我尝试构建本书的所有格式时出现以下错误:

==> rmarkdown::render_site(encoding = 'UTF-8')

Error in insert_chapter_script(config, "before") : 
  object 'config' not found
Calls: <Anonymous> ... <Anonymous> -> insert_code_chunk -> insert_chapter_script
Execution halted

Exited with status 1.

但是单独构建格式(pdf_book,epub_book和gitbook)确实有效。

我通过RStudio-&gt;安装了最小的小册子示例;新项目...... - &gt;新目录 - &gt;使用bookdown预订项目。

我使用新的RStudio预览版1.1.383,预订0.5.3。和rmarkdown 1.6.0.9004。 (我相信它确实适用于以前的RStudio版本)

1 个答案:

答案 0 :(得分:1)

这是 bookdown 的当前开发版本中的错误。我只是在{Github上fixed it。请 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.17</version> <configuration> <parallel>methods</parallel> <threadCount>${threads}</threadCount> <systemProperties> <browser>${browser}</browser> <screenshotDirectory>${project.build.directory}/screenshots</screenshotDirectory> <remoteDriver>${remote}</remoteDriver> <gridURL>${seleniumGridURL}</gridURL> <desiredPlatform>${platform}</desiredPlatform> <desiredBrowserVersion>${browserVersion}</desiredBrowserVersion> <!--Set properties passed in by the driver binary downloader--> <!--Set properties passed in by the driver binary downloader--> <phantomjs.binary.path>${phantomjs.binary.path}</phantomjs.binary.path> <webdriver.chrome.driver>${webdriver.chrome.driver}</webdriver.chrome.driver> <webdriver.ie.driver>${webdriver.ie.driver}</webdriver.ie.driver> <webdriver.opera.driver>${webdriver.opera.driver}</webdriver.opera.driver> </systemProperties> <includes> <!-- All that is left now is to clean up the code in our basicTest class and change its name to BasicTestWD. You may have noticed that we added an <includes> configuration item to our POM. This is because Maven will use maven-surefireplugin to run files that have test at the start or end of their name. We don't want maven-surefire-plugin to pick up our tests; we want to use maven-failsafeplugin instead. --> <include>**/*WD.java</include> </includes> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>com.lazerycode.selenium</groupId> <artifactId>driver-binary-downloader-maven-plugin</artifactId> <version>1.0.7</version> <configuration> <rootStandaloneServerDirectory> ${project.basedir}/src/test/resources/selenium_standalone_binaries </rootStandaloneServerDirectory> <downloadedZipFileDirectory>${project.basedir}/src/test/resources/selenium_standalone_zips </downloadedZipFileDirectory> <customRepositoryMap>${project.basedir}/src/test/resources/RepositoryMap.xml </customRepositoryMap> <overwriteFilesThatExist>${overwrite.binaries}</overwriteFilesThatExist> </configuration> <executions> <execution> <goals> <goal>selenium</goal> </goals> </execution> </executions> </plugin> </plugins> </build> 。谢谢!