When I deploy my application with "express" on heroku I have errors of this type:
Uncaught Error: Template parse errors:
Unexpected closing tag "button". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags ("lass="btn btn-default" routerlink=/add-person [routerlinkactive]="['router-link-active']">Add Person[ERROR ->]</button> </div> <div class=btn-group role=group> <button type=button class="btn btn-default" routerl"): ng:///t/t.html@0:866
Unexpected closing tag "button". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags ("btn btn-default" routerlink=/faces-importer [routerlinkactive]="['router-link-active']">Import Faces[ERROR ->]</button> </div> <div class=btn-group role=group> <button type=button class="btn btn-default" routerl"): ng:///t/t.html@0:1043
Unexpected closing tag "button". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags ("tton class="btn btn-default" routerlink=/analyse [routerlinkactive]="['router-link-active']">Analyse[ERROR ->]</button> </div> </div> </div> <div [hidden]=!displayOptions.showWebcam> <div class=span12> <video #v"): ng:///t/t.html@0:1208
at f (https://face-recognition-angular2.herokuapp.com/js/bundle.js:627:3464)
at t.normalizeLoadedTemplate (https://face-recognition-angular2.herokuapp.com/js/bundle.js:718:1969)
at t.normalizeTemplateSync (https://face-recognition-angular2.herokuapp.com/js/bundle.js:718:1467)
at t.normalizeTemplate (https://face-recognition-angular2.herokuapp.com/js/bundle.js:718:957)
at t._loadDirectiveMetadata (https://face-recognition-angular2.herokuapp.com/js/bundle.js:739:3470)
at https://face-recognition-angular2.herokuapp.com/js/bundle.js:739:6675
at Array.forEach (native)
at t.loadNgModuleDirectiveAndPipeMetadata (https://face-recognition-angular2.herokuapp.com/js/bundle.js:739:6647)
at https://face-recognition-angular2.herokuapp.com/js/bundle.js:760:59780
at Array.forEach (native)
Locally with "npm start" I have no error.
I think I have a configuration problem that does not include some html syntax.
app.js
var express = require('express');
var basicAuth = require('basic-auth-connect');
var app = express();
app.use(basicAuth('xxxx', 'xxxxxxxx'));
app.use(express.static('face-recognition/public'));
app.use("/public", express.static('public'));
var port = process.env.PORT || 3000;
app.listen(port, function () {
console.log(`Example app listening on port ${port} !`);
});
webpack-config
var helpers = require('./config/helpers');
module.exports = {
entry: "./app/main.ts",
output: {
path: helpers.root('public/js'),
filename: "bundle.js",
publicPath: '/js/'
},
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
loaders: [
{
loader: 'awesome-typescript-loader',
options: { configFileName: helpers.root('app', 'tsconfig.json') }
},
{
loader: 'angular2-template-loader'
}
]
},
{
test: /\.html$/,
loader: 'html-loader'
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel'
}
]
},
devServer: {
historyApiFallback: true
}
};
via Dimitri Sagnier
No comments:
Post a Comment