流星をtypescript es6を使ってangular2で使っていますが、非同期関数の流星法を書くときにこのエラーが発生しました。私は名前が同じときに挿入時にエラーが表示されないので、挿入クエリの同期問題に直面しています。だから私は繊維と未来を使用することに決めましたが、typecriptは繊維/未来のモジュールを見つけることができないという誤りを私に与え続けています。 私は 流星NPMは、将来をインストール繊維、 流星NPMをインストール 流星ostrioを追加しようとしている: [email protected]が、何も作業していません。このための解決策があれば教えてください。私がこの問題を解決するために使用できる他の方法があれば教えてください。meteor:流星法を書いているときにタイプコードを書くことができません
import { Emails } from '../collections/emails.collection';
import { check } from 'meteor/check';
import { Meteor } from 'meteor/meteor';
import Future from 'fibers/future';
Meteor.methods({
loadEmailTemp: function(tempn: string){
let temp = Emails.findOne({tempname: tempn});
return temp;
},
getAllTemplates: function() {
let temps = Emails.find({}).fetch();
return temps;
},
newTemplate: function(tempn: string) {
let err = false;
let result = Emails.insert({
tempname: tempn,
subject: '',
text: ''
}, function(error, result){
if(error){
console.log("ERROR",error);
err = true;
}
if(result) console.log("RESULT",result);
});
return result;
}
});
私のエラーが
W20161203-13:15:44.055(5.5)? (STDERR) /Users/exMachina/.meteor/packages/meteor-tool/.1.4.2_1.1ulueqv++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20161203-13:15:44.056(5.5)? (STDERR) throw(ex);
W20161203-13:15:44.056(5.5)? (STDERR) ^
W20161203-13:15:44.057(5.5)? (STDERR)
W20161203-13:15:44.057(5.5)? (STDERR) Error: Cannot find module 'fibers'
W20161203-13:15:44.058(5.5)? (STDERR) at Function.Module._resolveFilename (module.js:325:15)
W20161203-13:15:44.058(5.5)? (STDERR) at Function.Module._load (module.js:276:25)
W20161203-13:15:44.058(5.5)? (STDERR) at Module.require (module.js:353:17)
W20161203-13:15:44.059(5.5)? (STDERR) at require (internal/module.js:12:17)
W20161203-13:15:44.059(5.5)? (STDERR) at Object.<anonymous> (/Users/exMachina/.meteor/packages/ostrio_neo4jdriver/.1.0.2.1tve9ie++os+web.browser+web.cordova/npm/node_modules/neo4j-fiber/lib/helpers.js:33:11)
W20161203-13:15:44.059(5.5)? (STDERR) at Object.<anonymous> (/Users/exMachina/.meteor/packages/ostrio_neo4jdriver/.1.0.2.1tve9ie++os+web.browser+web.cordova/npm/node_modules/neo4j-fiber/lib/helpers.js:62:4)
W20161203-13:15:44.060(5.5)? (STDERR) at Module._compile (module.js:409:26)
W20161203-13:15:44.060(5.5)? (STDERR) at Object.Module._extensions..js (module.js:416:10)
W20161203-13:15:44.067(5.5)? (STDERR) at Module.load (module.js:343:32)
W20161203-13:15:44.067(5.5)? (STDERR) at Function.Module._load (module.js:300:12)