GVKun编程网logo

Git 项目推荐 | 机智云物联网应用 APP 开源框架(机智云物联网平台)

1

这篇文章主要围绕Git项目推荐|机智云物联网应用APP开源框架和机智云物联网平台展开,旨在为您提供一份详细的参考资料。我们将全面介绍Git项目推荐|机智云物联网应用APP开源框架的优缺点,解答机智云物

这篇文章主要围绕Git 项目推荐 | 机智云物联网应用 APP 开源框架机智云物联网平台展开,旨在为您提供一份详细的参考资料。我们将全面介绍Git 项目推荐 | 机智云物联网应用 APP 开源框架的优缺点,解答机智云物联网平台的相关问题,同时也会为您带来ActionController :: RoutingError没有路由与[GET]“ / vendor / assets / stylesheets / bootstrap.min.css”匹配 app / assets / stylesheets / application.css: app / assets / javascript / application.js: app / views / layout / application.html.erb: app / j、angular – ng new hello错误:路径“/app/app.module.ts”不存在.路径“/app/app.module.ts”不存在、FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - 调用 Firebase App.initializeApp() (app/no-app)、FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - 调用 Firebase App.initializeApp() (app/no-app)在应用程序的实用方法。

本文目录一览:

Git 项目推荐 | 机智云物联网应用 APP 开源框架(机智云物联网平台)

Git 项目推荐 | 机智云物联网应用 APP 开源框架(机智云物联网平台)

提供机智云开源框架源代码。开源框架已实现用户登录注册、设备配置、订阅等功能。使用机智云开源APP之前,需要先在机智云开发平台创建您自己的产品和应用。开源App需要使用您申请的AppId、AppSecret以及您自己的产品ProductKey才能正常运行。具体申请流程请参见:http://docs.gizwits.com/hc/。

ActionController :: RoutingError没有路由与[GET]“ / vendor / assets / stylesheets / bootstrap.min.css”匹配 app / assets / stylesheets / application.css: app / assets / javascript / application.js: app / views / layout / application.html.erb: app / j

ActionController :: RoutingError没有路由与[GET]“ / vendor / assets / stylesheets / bootstrap.min.css”匹配 app / assets / stylesheets / application.css: app / assets / javascript / application.js: app / views / layout / application.html.erb: app / j

如何解决ActionController :: RoutingError没有路由与[GET]“ / vendor / assets / stylesheets / bootstrap.min.css”匹配 app / assets / stylesheets / application.css: app / assets / javascript / application.js: app / views / layout / application.html.erb: app / j

我正在Rails上执行此应用程序,页面加载正常,但在控制台中显示:

Started GET "/vendor/assets/stylesheets/bootstrap.min.css" for ::1 at 2020-08-17 09:09:51 -0500

Started GET "/vendor/assets/javascripts/bootstrap.min.js" for ::1 at 2020-08-17 09:09:51 -0500
ActionController::RoutingError (No route matches [GET] 
"/vendor/assets/stylesheets/bootstrap.min.css"):
ActionController::RoutingError (No route matches [GET] 
"/vendor/assets/javascripts/bootstrap.min.js"):

在我的供应商文件夹中,我同时拥有文件夹,javascript和样式表,并分别位于各自的bootsrtrap.min中。 即使在application.html.erb中,我也有以下内容:

  <link href="vendor/assets/stylesheets/bootstrap.min.css" rel="stylesheet">
  <%= csrf_Meta_tags %>
  <%= stylesheet_link_tag    ''application'',media: ''all'',''data-turbolinks-track'': ''reload'' %>
  <%= javascript_include_tag ''application'',''data-turbolinks-track'': ''reload'' %>

</head>
<body>

  <!-- Navigation -->
  <nav>
    <div>
      <ahref="#">Instagram Clone</a>
      <buttontype="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
        <span></span>
      </button>
      <divid="navbarResponsive">
        <ul>
          <li>
            <ahref="#">Home
              <span>(current)</span>
            </a>
          </li>
          <li>
            <ahref="#">About</a>
          </li>
          <li>
            <ahref="#">Services</a>
          </li>
          <li>
            <ahref="#">Contact</a>
          </li>
        </ul>
      </div>
    </div>
  </nav>

  <!-- Page Content -->
  <div>
    <div>
      <div>
        <%= yield %>
      </div>
    </div>
  </div>

  <!-- Bootstrap core JavaScript -->
  <!--<script src="vendor/jquery/jquery.slim.min.js"></script>-->
  <script src="vendor/assets/javascripts/bootstrap.min.js"></script>
    
</body>
</html>

在js和CSS这两个应用程序文件中,我都放置了“ require bootsrtrap.min”,即使该错误仍然出现在控制台中。 会是什么?

解决方法

RoR不使用目录作为文件夹结构指示。因为有资产装载者。您应该将5s或更少的css导入application.css中,并将js导入application.js中。并使用自己的助手添加捆绑文件:

1。用纱安装靴子

yarn add bootstrap @popperjs/core jquery

npm i bootstrap @popperjs/core jquery

栏位不超过5

2。在Assets Pipeline中导入文件

app / assets / stylesheets / application.css:

//...
require bootstrap/dist/css/bootstrap.min
//...

但是,如果需要,我建议使用SCSS并仅导入所需的样式。

app / assets / javascript / application.js:

//...
//= require jquery
//= require @popperjs/core
//= require bootstrap/dist/js/bootstrap.min
//...

3。在布局中导入资产

app / views / layout / application.html.erb:

<head>
...
  <%= stylesheet_link_tag ''application'',media: ''all'' %>
</head>
<body>
...
  <%= javascript_include_tag ''application'' %>
</body>

使用webpack滚动6

2。在application.scss和application.js中导入Bootstrap

app / javascript / stylesheets / application.scss:

//...
import ''bootstrap''
//...

app / javascript / packs / application.js:

import ''jquery''
import ''popper.js''
import ''bootstrap''
import ''../stylesheets/application''

3。在布局中导入捆绑包

<head>
...
  <%= stylesheet_pack_tag ''application'',media: ''all'',''data-turbolinks-track'': ''reload'' %>
  <%= javascript_pack_tag ''application'',''data-turbolinks-track'': ''reload'' %>
</head>

之后,您应该可以在所有应用程序中使用引导程序!

,

[解决方案]因此,在我的HTML(application.html.erb)内部,我有两个对js和css文件的调用:

<script src="assets/javascripts/bootstrap.min.js"></script>
  <%= javascript_include_tag ''application'',''data-turbolinks-track'': ''reload'' %>       
<link href="assets/stylesheets/bootstrap.min.css" rel="stylesheet">
  <%= csrf_meta_tags %>
  <%= stylesheet_link_tag    ''application'',''data-turbolinks-track'': 
  ''reload'' %>

正如您在上面看到的那样,在使用javascript的情况下,我有一个使用脚本的调用,而另一个使用了的调用,两者都造成了问题,所以您只需要评论一个,我就对该脚本进行评论对于我的java文件和CSS文件,一个。 像这样:

  <!--<link href="assets/stylesheets/bootstrap.min.css" rel="stylesheet">-->
    <!--<script src="assets/javascripts/bootstrap.min.js"></script>-->

对我来说,解决了这个问题,我真的尝试了所有事情,这就是解决方案哈哈。

angular – ng new hello错误:路径“/app/app.module.ts”不存在.路径“/app/app.module.ts”不存在

angular – ng new hello错误:路径“/app/app.module.ts”不存在.路径“/app/app.module.ts”不存在

我在角度创建新项目时面临问题.
当我运行新的myapp命令时,我得到以下命令

新的你好

Error: Path "/app/app.module.ts" does not exist.
Path "/app/app.module.ts" does not exist.

谁能帮我吗???

解决方法

这是解决方案

Please make sure that your new folder have write permission

如果您使用的是ubuntu,请将以下命令运行到该文件夹

sudo chmod 644 -R foldername

然后运行新的appname

并检查您的节点版本

FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - 调用 Firebase App.initializeApp() (app/no-app)

FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - 调用 Firebase App.initializeApp() (app/no-app)

如何解决FirebaseError: Firebase: No Firebase App ''[DEFAULT]'' has been created - 调用 Firebase App.initializeApp() (app/no-app)

当我尝试设置 firebase whit next.js 时遇到了这个问题。我不知道发生了什么。

firebase.js 文件

  1. import firebase from ''firebase'';
  2. import ''firebase/auth'';
  3. import ''firebase/functions'';
  4. import ''firebase/firestore'';
  5. if (!firebase.apps.length) {
  6. firebase.initializeApp({
  7. apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN,projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID
  8. });
  9. }
  10. export default firebase;

我还创建了一个 .env.local 并添加了环境变量。

  1. NEXT_PUBLIC_FIREBASE_API_KEY=xxxxxxxxxxxxxx
  2. NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=xxxxxxxxxxxxxxxxxxxxxxxxxxx
  3. NEXT_PUBLIC_FIREBASE_PROJECT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxx

FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - 调用 Firebase App.initializeApp() (app/no-app)在应用程序

FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - 调用 Firebase App.initializeApp() (app/no-app)在应用程序

如何解决FirebaseError: Firebase: No Firebase App ''[DEFAULT]'' has been created - 调用 Firebase App.initializeApp() (app/no-app)在应用程序

我正在学习如何在 Ionic + Angular 项目中使用 Firebase 函数。

我想创建我的自定义函数,该函数将获取所有游戏(一个集合)并按照名为“count”的属性的顺序返回包含这些游戏的数组。我的第一步是获取所有游戏并显示以了解结构。

不幸的是,当我运行我的命令 firebase emulators:start 并访问我的函数“getMostPlayedGames”时,出现此错误:

FirebaseError: Firebase: No Firebase App ''[DEFAULT]'' has been created call Firebase App.initializeApp() (app/no-app). at app

这是我的 index.ts

import * as functions from ''firebase-functions'';
import * as admin from ''firebase-admin'';
import firebase from ''firebase'';

admin.initializeApp();

export const helloWorld = functions.https.onRequest((req,res) => {
    res.send(''Hello world'');
});

export const deleteExpiredSessions = functions.https.onRequest((req,res) => {
    functions.logger.info(''Automatic cleaning - Delete expired sessions from Database'',{ structuredData: true });
    res.send(''Automatic cleaning - Delete expired sessions from database'');
});

export const getMostPlayedGames = functions.https.onRequest((req,res) => {
    const db = firebase.firestore();
    const games = db.collection(''games'');
    console.log(games);
    functions.logger.info(''Get all games'',{ structuredData: true });
    res.send(games);
});

“HelloWorld”功能有效。

解决方法

在 Cloud Functions 中,如果您想与 Firebase 服务(例如 Firestore)交互,则需要使用 Admin SDK。

因此,以下更改(请参阅注释 // ...)应该可以解决问题(未经测试)

import * as functions from ''firebase-functions'';
import * as admin from ''firebase-admin'';

// import firebase from ''firebase'';    COMMENTED OUT

admin.initializeApp();

export const helloWorld = functions.https.onRequest((req,res) => {
    res.send(''Hello world'');
});

export const deleteExpiredSessions = functions.https.onRequest((req,res) => {
    functions.logger.info(''Automatic cleaning - Delete expired sessions from Database'',{ structuredData: true });
    res.send(''Automatic cleaning - Delete expired sessions from database'');
});

export const getMostPlayedGames = functions.https.onRequest((req,res) => {
    const db = admin.firestore();   // CHANGED
    const games = db.collection(''games'');
    console.log(games);
    functions.logger.info(''Get all games'',{ structuredData: true });
    res.send(games);
});

我们今天的关于Git 项目推荐 | 机智云物联网应用 APP 开源框架机智云物联网平台的分享已经告一段落,感谢您的关注,如果您想了解更多关于ActionController :: RoutingError没有路由与[GET]“ / vendor / assets / stylesheets / bootstrap.min.css”匹配 app / assets / stylesheets / application.css: app / assets / javascript / application.js: app / views / layout / application.html.erb: app / j、angular – ng new hello错误:路径“/app/app.module.ts”不存在.路径“/app/app.module.ts”不存在、FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - 调用 Firebase App.initializeApp() (app/no-app)、FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - 调用 Firebase App.initializeApp() (app/no-app)在应用程序的相关信息,请在本站查询。

本文标签:

上一篇OSC 高手问答 -- 移动 APP 性能评测与优化(移动app性能评测与优化pdf)

下一篇windows-phone-7 – 如何同时为两个轴(X,Y)翻译动画?