Ich versuche, eine Node.JS App zu erstellen, die das Open-Source-Alpaka-Forms-Paket verwendet:Vorlage wurde mit einer neueren Version von Lenkerfehler mit meiner Node.JS-App vorkompiliert?
Ich bin mit Node-Version: v0.10.25
Als ich das laufen Testseite aus dem Tutorial:
http://www.alpacajs.org/tutorial.html
die zweite Beispielseite in diesem Tutorial gefunden verwenden:
<html>
<head>
<link type="text/css" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
<link type="text/css" href="//code.cloudcms.com/alpaca/1.5.17/bootstrap/alpaca.min.css" rel="stylesheet" />
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.3/handlebars.js"></script>
<script type="text/javascript" src="//code.cloudcms.com/alpaca/1.5.17/bootstrap/alpaca.min.js"></script>
</head>
<body>
<div id="form"></div>
<script type="text/javascript">
$(document).ready(function() {
$("#form").alpaca({
"schema": {
"title":"User Feedback",
"description":"What do you think about Alpaca?",
"type":"object",
"properties": {
"name": {
"type":"string",
"title":"Name"
},
"feedback": {
"type":"string",
"title":"Feedback"
},
"ranking": {
"type":"string",
"title":"Ranking",
"enum":['excellent','ok','so so']
}
}
}
});
});
</script>
</body>
</html>
ich die folgenden zwei Fehler in der Chrome-Debugger-Konsole beschweren, dass die Vorlagen ich mit einem neueren Version Lenker als die aktuelle Laufzeit erstellt wurden verwende, nicht ältere wie die meisten die gemeldeten Probleme auf SO angeben. Hier ist der Fehler-Dump aus dem Chrome-Debugger-Konsole:
Uncaught Error: Template was precompiled with a newer version of Handlebars than the current runtime.
Please update your runtime to a newer version (>= 4.0.0).
Exception @ handlebars.js:2520
checkRevision @ handlebars.js:2693
template @ handlebars.js:2709
hb.template @ handlebars.js:196
(anonymous function) @ alpaca.min.js:1
(anonymous function) @ alpaca.min.js:1
(anonymous function) @ alpaca.min.js:1
Uncaught TypeError: $(...).alpaca is not a function
(anonymous function) @ (index):14
j @ jquery-1.11.1.min.js:2
k.fireWith @ jquery-1.11.1.min.js:2
m.extend.ready @ jquery-1.11.1.min.js:2
J @ jquery-1.11.1.min.js:2
ich mit NPM geprüft und ich bin eine Version von Lenker verwenden, die neuer als 4.0.0:
$ npm ls | grep handlebars
└─┬ [email protected]
So scheint es die Fehlermeldung ist falsch?
fand ich diese beiden SO Kommentare:
Template was precompiled with an older version of Handlebars than the current runtime
Uncaught Error: Template was precompiled with an older version of Handlebars
Aber ich bin mit Gulp oder Ember.js nicht so weiß ich nicht, ob die gegebenen Heilmittel für meine Situation anwenden . Hier
ist eine Liste der Pakete habe ich installiert nach NPM:
npm ls
/home/roschler
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └── [email protected]
└─┬ [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
└─┬ [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└─┬ [email protected]
├── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └── [email protected]
├── [email protected]
└── [email protected]
Wie kann ich diese Fehler zu beheben?
@Omarjmh Ich benutze v0.10.25 –
@Omarjmh Drop-Down? Die Fehlermeldung besagt, dass ich eine neuere Version des Lenkers brauche, nicht älter. –
@Omarjmh Gerade meine Paketliste hinzugefügt. –