0

我生成了一个示例应用程序只是为了测试构建过程,它在构建过程中出错。

$ ./js steal/buildjs apps/hello/hello.html -to apps/helloprod
Building to apps/helloprod/

BUILDING STYLES --------------- 
   apps/hello/hello.css

STYLE BUNDLE > apps/helloprod/production.css
Nice! Compressed: 17.1%  Before: 41.0 bytes  After: 34.0 bytes
!!!!!!!!!!! ERROR !!!!!!!!!!!

-message       = java.io.FileNotFoundException: apps/helloprod/production.css (No such file or directory)
-fileName      = steal/rhino/file.js
-lineNumber    = 217
-name          = JavaException
-javaException = java.io.FileNotFoundException: apps/helloprod/production.css (No such file or directory)

                 error loading html element  [object HTMLScriptElement]   JavaException: java.io.FileNotFoundException: apps/helloprod/production.css (No such file or directory) 

当我生成应用程序时,默认情况下 .css 文件中有一些内容,所以我什至尝试删除里面的内容(在这种情况下,它会出错,因为它无法计算文件的大小,例如。它说NaN undefined而不是41.0 字节)。当我刚刚收到这个错误时,出现了这个错误hello.css

body{
  background-color:lightyellow;
}

有任何想法吗?

4

1 回答 1

0

根据错误消息,您的问题是该apps/helloprod/production.css文件丢失。

确保此文件存在,如果从构建过程中删除。

编辑:

是因为steal/rhino/file.js包含在 CSS 的源文件中吗?

于 2012-04-18T19:04:11.283 回答