标签: netlify

无法访问身份设置。使用 git-gateway 后端时,请确保启用身份服务和 Git 网关 - Netlify

使用Netlify时身份验证失败,我收到消息:

Unable to access identity settings. 
When using git-gateway backend make sure to enable Identity service and Git Gateway.
Run Code Online (Sandbox Code Playgroud)

netlify

1
推荐指数
1
解决办法
2760
查看次数

将 Netlify 环境变量与 Nuxt.js 结合使用

我想要使​​用 Nuxt.js 和 Vue.js 构建的 Web 应用程序来访问我在 Netlify 环境 UI(设置菜单)中添加的环境变量。

当我运行本地服务器时,我的代码访问 .env 文件并检索正确的代码没有问题。

但是当我用 Netlify 构建它时,它返回未定义。

自从我看到有些人这样做以来,我尝试向环境变量添加不同的前缀:

VUE_APP_MY_VARIABLE
NUXT_APP_MY_VARIABLE
VUE_MY_VARIABLE
NUXT_MY_VARIABLE
Run Code Online (Sandbox Code Playgroud)

我不明白为什么当网站上线时无法访问变量。

如果您缺少任何信息,请告诉我,我会添加它。

提前致谢!

vue.js netlify nuxt.js

1
推荐指数
1
解决办法
1157
查看次数

重定向不适用于带有 nextjs 的 netlify

我只是按照文档将其添加到我的 next.config.js 中

module.exports = {
  reactStrictMode: true,
   async redirects() {
    return [
      {
        source: "/",
        destination: "/coming-soon",
        permanent: false,
      },
    ];
  },
}
Run Code Online (Sandbox Code Playgroud)

即使我构建应用程序,它也确实可以在我的机器上运行,但在 netlify 上,由于某种原因根本没有重定向

node.js reactjs netlify next.js

1
推荐指数
1
解决办法
2487
查看次数

React 应用程序部署到 Netlify:找不到模块:错误:无法解析“/opt/build/repo/src”中的“./pages/HomePage”

部署错误

我该如何解决这个错误?

我尝试了很多方法,例如使用 Netlify CLI、链接到 git 和 github,但没有任何效果。

该应用程序在开发模式下运行良好,没有错误,但显示错误:在 Netlify 和 Github 页面上未找到 404 页面

已部署应用程序的链接

我应该怎么办?

deployment github-pages reactjs netlify

1
推荐指数
1
解决办法
1245
查看次数

发布.NET Core / Angular 4项目以Netlify

有没有人有将.NET / Angular项目发布到Netlify的经验?我正在使用Angular Microsoft.AspNetCore.SpaTemplates模板。在Netlify上,我得到了一个非零的退出代码,这使我无法发布。这是我的输出:

9:44:44 AM: Build ready to start
9:44:44 AM: Fetching cached dependencies
9:44:44 AM: Starting to download cache of 8.9MB
9:44:45 AM: Finished downloading cache in 225.765972ms
9:44:45 AM: Preparing Git Reference refs/heads/master
9:45:00 AM: Running build command: dotnet restore && dotnet build && dotnet run
9:45:02 AM: Downloading and installing node v6.11.4...
9:45:02 AM: Downloading https://nodejs.org/dist/v6.11.4/node-v6.11.4-linux-x64.tar.xz...
9:45:03 AM: 
9:45:03 AM:   0.0%
9:45:03 AM: 
                                                                           1.1%
9:45:03 AM: 
###                                                                        4.9%
9:45:03 AM: 
##############
9:45:03 AM:  19.8%
9:45:03 AM: …
Run Code Online (Sandbox Code Playgroud)

c# .net-core netlify angular

0
推荐指数
1
解决办法
2123
查看次数

Netlify上的Ruby版本

我在使用Netlify时遇到了一些问题.我使用Jekyll创建了一个新网站,我在Bitbucket上有我的存储库,一切正常.

我在Netlify帐户上设置了Bitbucket的部署,但是当我尝试部署时总是失败,我在日志中收到此错误:

9:59:15 AM: ruby_dep-1.5.0 requires ruby version >= 2.2.5, which is incompatible with the
9:59:15 AM: current version, ruby 2.1.2p95
9:59:15 AM: Error during gem install
9:59:15 AM: Build complete: exit code: 1
9:59:15 AM: Error running command: Build script returned non-zero exit code: 1
9:59:15 AM: Failing build: Failed to build site
9:59:15 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
9:59:15 AM: Finished processing build request in 11.891885136s
Run Code Online (Sandbox Code Playgroud)

我目前正在使用这个版本的ruby 2.4.2p198(2017-09-14修订版59899)[x86_64-darwin17],我已经生成并提交了一个.rubyversion文件: …

ruby rubygems version jekyll netlify

0
推荐指数
1
解决办法
500
查看次数

VueJS 路由/导航问题

使用 VueJS 时遇到问题(第一次使用)

  • 我在 doc root 的 index.html 文件中有 90% 的页面模板
  • 我有 3 个组件(每个组件都包含每个“页面”的主要内容正文)

我的路由器:

export default new Router({
  mode: 'history',
  hash: false,
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/gallery',
      name: 'Gallery',
      component: Gallery
    },
    {
      path: '/contact',
      name: 'Contact',
      component: Contact
    }
  ]
})
Run Code Online (Sandbox Code Playgroud)

我无法开始<router-link :to="{ name: 'Gallery' }">Gallery</router-link>工作 - 我的网站没有将它们呈现为我的 index.html 中的锚标记(我可能不明白如何/在哪里可以使用 Vue) - 所以我使用的是标准链接,例如<a class="nav-link" href="/gallery">Gallery</a>

问题:

虽然所有这些代码在我的本地机器上运行良好,但它在我上传代码的任何地方都不起作用(我想让它在 Netlify 上运行)。Netlify 和其他站点会覆盖我删除哈希的尝试,因此我的链接然后链接到例如

https://examplesite.com/#/ => https://examplesite.com/gallery#/

javascript vue.js vue-router netlify

0
推荐指数
1
解决办法
810
查看次数

netlifyCMS 和 Gatsby 的“未找到后端”

我一直在尝试在通过克隆gatsby-starter-default制作的非常基本的 Gatsby 应用程序上设置 NetlifyCMS 。我遵循了来自 Netlify CMS采购说明,但我不断收到未找到后端的错误。这是我的 Gatsby 设置:

/static/admin/config.yml

backend:
  name: appendtoStatic
  branch: master

media_folder: static/img
public_folder: /images

collections:
  - name: "pages"
    label: "Pages"
    files:    
      - file: "src/pages/about.md"
        label: "About"
        name: "about"
        fields:
          - {
              label: "Template Key",
              name: "templateKey",
              widget: "hidden",
              default: "about-page",
            }
          - { label: "Title", name: "title", widget: "string" }
          - { label: "Body", name: "body", widget: "markdown" }
Run Code Online (Sandbox Code Playgroud)

这是我的 package.json

{
  "name": "gatsby-starter-default",
  "private": true,
  "description": "A simple …
Run Code Online (Sandbox Code Playgroud)

gatsby netlify netlify-cms

0
推荐指数
1
解决办法
879
查看次数

Netlify does not recognize form in nuxt app

We implemented a simple nuxt app with a basic form and deployed it to netlify. When pressing the "Submit" Button of the Form, we receive a 404.

Here you can find the link to the deployed netlify app:
EDIT -> Removed Link

After looking through the troubleshoot guide, they listed that the added "netlify" or "data-netlify="true" attributes should not be visible if netlify recognized your form, but they are.

Plus the form can't be found in the "form" configuration tab …

forms vue.js netlify nuxt.js

0
推荐指数
1
解决办法
199
查看次数

Nuxt 在构建时访问 git 版本或哈希并在页面中使用

我有一个通过 Netlify 部署的 Nuxt/Vue 应用程序。我正在尝试将 git 版本号和哈希注入body页面的 。我假设有一种非常简单的方法可以做到这一点(但我不知道它是什么!)。

git github vue.js netlify nuxt.js

0
推荐指数
1
解决办法
724
查看次数