私は機能しているAngular2-Meteorのインストールがあります。この上にmeteor add nimbleを追加した後でRestivusを見つけることができません:restivus
、私はインストールは何の問題が表示されないコマンド
meteor add nimble:restivus
経由Restivusをインストールしました。 Restivusページ(https://github.com/kahmali/meteor-restivus)で見つかった例に続いて、私はAPIを設定するには、最初のファイル(logs.collection.ts)を作成しました
import {Mongo} from 'meteor/mongo';
import {Restivus} from 'meteor/numble:restivus';
import {Log} from '../interfaces/log.interface';
export const Logs = new Mongo.Collection<Log>('logs');
function loggedIn() {
return !!Meteor.user();
}
let allowInsert =() => {return false};
let allowUpdate =() => {return false};
let allowDelete =() => {return false}
Logs.allow({
insert: allowInsert,
update: allowUpdate,
remove: allowDelete
});
if (Meteor.isServer) {
// Global API configuration
var Api = new Restivus({
useDefaultAuth: true,
prettyJson: true
});
// Generates: GET, POST on /api/items and GET, PUT, DELETE on
// /api/items/:id for the Items collection
Api.addCollection(Logs);
}
私の問題は、IDEが私に言っていることですそれは'モジュールmeteor/numble:restivusを見つけることができません。
私が間違っていたことについてのアイデアはありますか? ありがとうございます
エラーが発生してもコードは実行されますか?どのIDEを使用していますか?最も起こりそうなことは、Restivusコードをうまくインポートしていることですが、Linterは流星モジュールのインポートによって投げ捨てられています。 –
私はVisual Studio Codeを使用しています。 mongo/nimble:restivusからインポートするのは正しいですか?それは修正できると思いますか?どんな場合でもThx – Picci
あなたは軽快ではなく麻薬を書いています。 – erikwall