无法在Node js上运行Sencha CMD生成的ExtJS 6.2应用

时间:2020-08-17 08:28:45

标签: node.js express extjs sencha-cmd

我正在尝试运行在Node.js上使用Sencha CMD生成的现有ExtJS 6.2应用程序。以下是我的app.js:

const express = require('express');
const app  = express();

//Middleware
app.use(express.static(__dirname + '/public/monitor/' ));
app.post('/', function( req ,res){
    res.send("Success");
});

app.listen(3000, function(){
    console.log('Server running on port 3000');
});

var server = app.listen(3300, function () {
    var host = server.address().address;
    var port = server.address().port;

    console.log('App listening at http://%s:%s', host, port);
});

但是,由于以下错误,它无法运行页面。

Refused to apply style from 'http://localhost:3000/build/development/Monitor/classic/resources/Monitor-all_1.css?_dc=1597650810261' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

sencha website中已经有一个指南,但是该指南不适用于ExtJS的GPL版本。因此,我无法更新到ExtJS 6.6或7.0。

对此有何解决方法?

1 个答案:

答案 0 :(得分:0)

引起此问题的原因是文件夹中缺少css文件。我从另一台机器上得到它,它解决了问题。

相关问题