gpt4 book ai didi

jquery - Meteor Galaxy 部署 - 托管时出现控制台错误且不显示路由

转载 作者:太空宇宙 更新时间:2023-11-04 02:00:00 26 4
gpt4 key购买 nike

如上所述,当我的应用程序托管在 Galaxy 上时,我遇到了一个问题。我看不到我网站的任何内容:

我只看到这个: My app says, that no routes are defined

但是我使用iron router定义了所有路由。我的导入文件夹中有一些 react 路由器的东西,也许这就是问题所在?我不知道...

此外,我还收到以下错误消息:

Mixed Content: The page at 'https://myapp.eu.meteorapp.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700'. This request has been blocked; the content must be served over HTTPS.

Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3 at 21478a3d30e8f0ae766afe74c96bb1f3590793e6.js:115 at 21478a3d30e8f0ae766afe74c96bb1f3590793e6.js:115 at 21478a3d30e8f0ae766afe74c96bb1f3590793e6.js:115 at 21478a3d30e8f0ae766afe74c96bb1f3590793e6.js:115

我使用的是 Chrome 浏览器。我只是想看点什么...拜托

更新

我的所有路线都是这样的:

Router.route('/', function () {
Router.go('home');
});

Router.route('/imprint', function () {
this.render('imprint');
});

Router.route('/dashboard', function () {
this.render('dashboard');
});

有时像:

Router.route('/do/:home/editDetails/:Id', function () {
var params = this.params;
Session.set('home', params.home);
Session.set('Id', params.Id);
this.render('editDetails');
});

或同等内容。我正在使用 meteor 铁路由器包。这是我完整的包文件:

meteor-base@1.1.0             # Packages every Meteor app needs to have
mongo@1.2.0 # The database Meteor supports right now
blaze-html-templates # Compile .html files into Meteor Blaze views
reactive-var@1.0.11 # Reactive variable for tracker
tracker@1.1.3 # Meteor's client-side reactive programming library

standard-minifier-css@1.3.4 # CSS minifier run for production mode
standard-minifier-js@2.1.1 # JS minifier run for production mode
es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers
ecmascript@0.8.2 # Enable ECMAScript2015+ syntax in app code

kadira:blaze-layout # Layout manager for blaze (works well with FlowRouter)
less@2.7.9 # Leaner CSS language


practicalmeteor:mocha # A package for writing and running your meteor app and package tests with mocha
johanbrook:publication-collector # Test a Meteor publication by collecting its output


iron:router
zimme:iron-router-active
natestrauser:animate-css
kevohagan:sweetalert
chrismbeckett:toastr
fortawesome:fontawesome
session@1.1.7
logging@1.1.17
reload@1.1.11
random@1.0.10
ejson@1.0.14
spacebars
check@1.2.5
okgrow:router-autoscroll
joshdellay:meteor-ladda-bootstrap
d3js:d3
emdagon:c3js
andrasph:clockpicker
tsega:bootstrap3-datetimepicker

shell-server@0.2.4
http@1.2.12
peerlibrary:xml2js
meteorhacks:npm
json
jaredmartin:future

accounts-password@1.4.0
accounts-ui-unstyled@1.2.1
altapp:recaptcha
chart:chart
jackyqiu:meteor-jvectormap
jasny:bootstrap
meteorhacks:async
meteorhacks:ssr
mizzao:jquery-ui
mrgalaxy:stripe
mrt:footable

themeteorchef:bert
themeteorchef:jquery-validation
timmyg:wow
yagni:split-on-newlines
dynamic-import@0.1.1
alanning:roles
email@1.2.3
momentjs:moment
cosio55:autoform-cloudinary
aldeed:autoform
aldeed:collection2
nekojira:cloudinary-jquery-upload
allow-deny@1.0.6
cesarve:simple-chat
templating
ddp-rate-limiter

npm-container
mdg:validated-method
underscore
dburles:factory
practicalmeteor:chai
xolvio:cleaner
jquery

由于我使用Boostrap-Theme,所以给出了meteor文件夹结构。因为我在部署时遇到问题,所以我使用 --full 标志创建了一个新的meteor项目并将我的代码复制到其中。

一切都在本地主机上运行。

I have an import folder, with some code like:

import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import { Meteor } from 'meteor/meteor';
import App from '../../ui/layouts/App.js';
import Documents from '../../ui/pages/Documents.js';
import NewDocument from '../../ui/pages/NewDocument.js';
import EditDocument from '../../ui/containers/EditDocument.js';
import ViewDocument from '../../ui/containers/ViewDocument.js';
import Index from '../../ui/pages/Index.js';
import Login from '../../ui/pages/Login.js';
import NotFound from '../../ui/pages/NotFound.js';
import RecoverPassword from '../../ui/pages/RecoverPassword.js';
import ResetPassword from '../../ui/pages/ResetPassword.js';
import Signup from '../../ui/pages/Signup.js';

const authenticate = (nextState, replace) => {
if (!Meteor.loggingIn() && !Meteor.userId()) {
replace({
pathname: '/login',
state: { nextPathname: nextState.location.pathname },
});
}
};

Meteor.startup(() => {
render(
<Router history={ browserHistory }>
<Route path="/" component={ App }>
<IndexRoute name="index" component={ Index } />
<Route name="documents" path="/documents" component={ Documents } onEnter={ authenticate } />
<Route name="newDocument" path="/documents/new" component={ NewDocument } onEnter={ authenticate } />
<Route name="editDocument" path="/documents/:_id/edit" component={ EditDocument } onEnter={ authenticate } />
<Route name="viewDocument" path="/documents/:_id" component={ ViewDocument } onEnter={ authenticate } />
<Route name="login" path="/login" component={ Login } />
<Route name="recover-password" path="/recover-password" component={ RecoverPassword } />
<Route name="reset-password" path="/reset-password/:token" component={ ResetPassword } />
<Route name="signup" path="/signup" component={ Signup } />
<Route path="*" component={ NotFound } />
</Route>
</Router>,
document.getElementById('react-root')
);
});

也许这会影响路由?当我创建新的 --full 项目时,我还在我的应用程序中自动加载了 Flow-router 包。我把包裹拿走了。不过,我正在使用 Blaze 和 Iron-router。没有反应或流路由器。

非常感谢

最佳答案

已解决:

我不知道确切的错误,但这不是路线本身的问题。我用我的代码制定了一个完整的新项目并检查了每个文件。该错误必须对meteor 包文件及其与npm 相关的依赖项执行某些操作。一切都很好,直到我添加所有需要的包。我想启动应用程序后,它失败了,控制台显示现在 npm 已设置,我应该重新启动应用程序。比 npm-container 位于我的包文件中并且发生“找不到路由”的情况。

但是,我使用了以前的版本,删除了软件包并一一添加了我需要的软件包,现在它可以工作了。感谢您的努力。

关于jquery - Meteor Galaxy 部署 - 托管时出现控制台错误且不显示路由,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46363869/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com