meteor-admin을 사용하려고합니다. 모든 것을 설치하고 localhost:PORT/admin
링크를 열었습니다. 그 후 나는 root/client/admin.js
및 root/server/entry.js
에이 코드를 붙여 :meteor-admin 사용법
AdminConfig = {
adminEmails: [' [email protected]'],
collections:
{
Posts: {},
Comments: {}
}
}
또한 클라이언트와 서버 모두에 대한 root/
의 글로벌 파일을 생성했습니다. 문제는 클라이언트 파일이 작동하지만 페이지에 You need to be an admin to view this page
줄이 표시됩니다. 내가 root/server
에 필요한 코드를 추가 할 때이 오류를 얻을 :
=> Exited with code: 1
I20161013-19:43:24.308(5.5)? ** You've set up some data subscriptions with Meteor.publish(), but
I20161013-19:43:24.308(5.5)? ** you still have autopublish turned on. Because autopublish is still
I20161013-19:43:24.309(5.5)? ** on, your Meteor.publish() calls won't have much effect. All data
I20161013-19:43:24.309(5.5)? ** will still be sent to all clients.
I20161013-19:43:24.309(5.5)? **
I20161013-19:43:24.309(5.5)? ** Turn off autopublish by removing the autopublish package:
I20161013-19:43:24.309(5.5)? **
I20161013-19:43:24.309(5.5)? ** $ meteor remove autopublish
I20161013-19:43:24.310(5.5)? **
I20161013-19:43:24.310(5.5)? ** .. and make sure you have Meteor.publish() and Meteor.subscribe() calls
I20161013-19:43:24.310(5.5)? ** for each collection that you want clients to see.
I20161013-19:43:24.310(5.5)?
W20161013-19:43:24.553(5.5)? (STDERR) /home/cortana/.meteor/packages/meteor-tool/.1.4.1_2.354htk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20161013-19:43:24.553(5.5)? (STDERR) throw(ex);
W20161013-19:43:24.554(5.5)? (STDERR) ^
W20161013-19:43:24.554(5.5)? (STDERR)
W20161013-19:43:24.554(5.5)? (STDERR) Error: Posts is not in the [object global]
W20161013-19:43:24.554(5.5)? (STDERR) at Assets.lookup (packages/yogiben_admin/lib/both/utils.coffee:22:14)
W20161013-19:43:24.554(5.5)? (STDERR) at Assets.adminCollectionObject (packages/yogiben_admin/lib/both/utils.coffee:5:3)
W20161013-19:43:24.554(5.5)? (STDERR) at packages/yogiben_admin/lib/both/startup.coffee:63:16
W20161013-19:43:24.555(5.5)? (STDERR) at Function._.each._.forEach (packages/underscore/underscore.js:113:1)
W20161013-19:43:24.555(5.5)? (STDERR) at adminCreateTables (packages/yogiben_admin/lib/both/startup.coffee:36:4)
W20161013-19:43:24.555(5.5)? (STDERR) at packages/yogiben_admin/lib/both/startup.coffee:166:2
W20161013-19:43:24.555(5.5)? (STDERR) at /home/cortana/Desktop/deeplibrary/.meteor/local/build/programs/server/boot.js:299:5
=> Exited with code: 1
I20161013-19:43:27.957(5.5)? ** You've set up some data subscriptions with Meteor.publish(), but
I20161013-19:43:27.957(5.5)? ** you still have autopublish turned on. Because autopublish is still
I20161013-19:43:27.959(5.5)? ** on, your Meteor.publish() calls won't have much effect. All data
I20161013-19:43:27.960(5.5)? ** will still be sent to all clients.
I20161013-19:43:27.960(5.5)? **
I20161013-19:43:27.960(5.5)? ** Turn off autopublish by removing the autopublish package:
I20161013-19:43:27.960(5.5)? **
I20161013-19:43:27.960(5.5)? ** $ meteor remove autopublish
I20161013-19:43:27.961(5.5)? **
I20161013-19:43:27.961(5.5)? ** .. and make sure you have Meteor.publish() and Meteor.subscribe() calls
I20161013-19:43:27.961(5.5)? ** for each collection that you want clients to see.
I20161013-19:43:27.961(5.5)?
W20161013-19:43:28.246(5.5)? (STDERR) /home/cortana/.meteor/packages/meteor-tool/.1.4.1_2.354htk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20161013-19:43:28.246(5.5)? (STDERR) throw(ex);
W20161013-19:43:28.246(5.5)? (STDERR) ^
W20161013-19:43:28.246(5.5)? (STDERR)
W20161013-19:43:28.247(5.5)? (STDERR) Error: Posts is not in the [object global]
W20161013-19:43:28.247(5.5)? (STDERR) at Assets.lookup (packages/yogiben_admin/lib/both/utils.coffee:22:14)
W20161013-19:43:28.247(5.5)? (STDERR) at Assets.adminCollectionObject (packages/yogiben_admin/lib/both/utils.coffee:5:3)
W20161013-19:43:28.247(5.5)? (STDERR) at packages/yogiben_admin/lib/both/startup.coffee:63:16
W20161013-19:43:28.247(5.5)? (STDERR) at Function._.each._.forEach (packages/underscore/underscore.js:113:1)
W20161013-19:43:28.247(5.5)? (STDERR) at adminCreateTables (packages/yogiben_admin/lib/both/startup.coffee:36:4)
W20161013-19:43:28.247(5.5)? (STDERR) at packages/yogiben_admin/lib/both/startup.coffee:166:2
W20161013-19:43:28.248(5.5)? (STDERR) at /home/cortana/Desktop/deeplibrary/.meteor/local/build/programs/server/boot.js:299:5
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.
나는이 오류를 제거하려면 어떻게해야합니까? 왜이 오류가 여기에 있습니까? 추신 :
는 또한 root/server
이 코드를 시도하고 같은 오류를 가지고 : 당신은 당신의 응용 프로그램에서 autopublish 패키지를 제거해야
AdminConfig = {
roles: ['admin'],
collections: {
Posts: {}
}
};
뭔가를 시도해야합니다. 자동 게시 모듈을 제거했지만 현재 앱이 실행되지 않습니다. 그냥 '앱 시작'에 머물러 있습니다. –