Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/425.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Meteor资源解释为样式表,但使用MIME类型text/html传输_Javascript_Meteor - Fatal编程技术网

Javascript Meteor资源解释为样式表,但使用MIME类型text/html传输

Javascript Meteor资源解释为样式表,但使用MIME类型text/html传输,javascript,meteor,Javascript,Meteor,我正在使用meteor,我的静态文件位于公共目录中: // Directory Structure app app/.meteor app/server app/client app/packages app/lib app/public app/public/styles app/public/images 在我的index.html中,我有以下内容: 我仍然得到这个错误: 资源被解释为样式表,但使用MIME

我正在使用meteor,我的静态文件位于公共目录中:

// Directory Structure

app
    app/.meteor
    app/server
    app/client
    app/packages
    app/lib
    app/public
        app/public/styles
        app/public/images
在我的
index.html
中,我有以下内容:

我仍然得到这个错误:

资源被解释为样式表,但使用MIME类型text/html传输:http://localhost:3000/public/styles/app.css“


我怎样才能解决这个问题?meteor公共目录的正确用法是什么?

您请求的目录不正确。Meteor提供HTML,就像它提供任何不指向文件的路径一样

URL路径应指向

<link rel="stylesheet" href="/styles/app.css"/>


public
中的所有内容都应映射到
/

我的样式表位于
中,因为建议将所有样式表移动到此结构中。我怎样才能摆脱同样的错误?谢谢!我希望我能早一个小时看到这个!