localhost 相关问题

在计算机网络中,localhost(意味着此计算机)是给予环回网络接口地址的标准主机名。

找不到本地主机 Microsoft Visual Studio

我无法调试/测试我的.Net 网站。我不断收到找不到本地主机的错误。以前运行得很好,但最近几天却出现了错误。任何帮助将不胜感激...

回答 3 投票 0

将 localhost Express API 公开到互联网

我想将我的本地主机API公开到互联网,或者一些允许我拥有良好带宽的替代方案。 我在 Express 中内置了一个 API,可以执行网页抓取并产生高消耗...

回答 1 投票 0

RTK 查询指向 localhost 而不是 baseUrl

代码如下。我通过 Components/Pages/Scrap.tsx console.log 以下错误。 {状态:'PARSING_ERROR',原始状态:200,数据:' 代码如下。我通过 Components/Pages/Scrap.tsx console.log 以下错误。 {status: 'PARSING_ERROR', originalStatus: 200, data: '<!DOCTYPE html>\n<html lang="en">\n <head>\n <met…uild` or `yarn build`.\n -->\n </body>\n</html>\n', error: `SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON`} data: "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <link rel=\"icon\" href=\"/favicon.ico\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <meta name=\"theme-color\" content=\"#000000\" />\n <meta\n name=\"description\"\n content=\"Web site created using create-react-app\"\n />\n <link rel=\"apple-touch-icon\" href=\"/logo192.png\" />\n <!--\n manifest.json provides metadata used when your web app is installed on a\n user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/\n -->\n <link rel=\"manifest\" href=\"/manifest.json\" />\n <!--\n Notice the use of in the tags above.\n It will be replaced with the URL of the `public` folder during the build.\n Only files inside the `public` folder can be referenced from the HTML.\n\n Unlike \"/favicon.ico\" or \"favicon.ico\", \"/favicon.ico\" will\n work correctly both with client-side routing and a non-root public URL.\n Learn how to configure a non-root public URL by running `npm run build`.\n -->\n <title>React App</title>\n <script defer src=\"/static/js/bundle.js\"></script></head>\n <body>\n <noscript>You need to enable JavaScript to run this app.</noscript>\n <div id=\"root\"></div>\n <!--\n This HTML file is a template.\n If you open it directly in the browser, you will see an empty page.\n\n You can add webfonts, meta tags, or analytics to this file.\n The build step will place the bundled scripts into the <body> tag.\n\n To begin the development, run `npm start` or `yarn start`.\n To create a production bundle, use `npm run build` or `yarn build`.\n -->\n </body>\n</html>\n" error: "SyntaxError: Unexpected token '<', \"<!DOCTYPE \"... is not valid JSON" originalStatus: 200 status: "PARSING_ERROR" [[Prototype]]: Object 开发工具的网络选项卡中的一些调查显示 RTK查询似乎正在尝试查询 http://localhost:3000/scrape?url=https://somewebsite.com 而不是预期的终点 https://localhost:7125/scrape?url=https://somewebsite.com api/scrape-api.ts import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'; import type { scrapeModel } from '../models/scrape-model'; export const scrapeApi = createApi({ reducerPath: 'scrapeApi', baseQuery: fetchBaseQuery({ baseUrl: 'https://localhost:7125/' }), endpoints: builder => ({ scrapeUrl: builder.query<scrapeModel, string>({ query: url => `scrape?url=${url}` }) }) }); export const { useScrapeUrlQuery } = scrapeApi; 商店/index.ts import { configureStore } from '@reduxjs/toolkit'; import { setupListeners } from '@reduxjs/toolkit/dist/query'; import { scrapeApi } from '../api/scrape-api'; import scrapeReducer from './scrape'; export const store = configureStore({ reducer: { [scrapeApi.reducerPath]: scrapeApi.reducer, scrape: scrapeReducer }, middleware: getDefaultMiddleware => { return getDefaultMiddleware().concat(scrapeApi.middleware); } }); setupListeners(store.dispatch); export type RootState = ReturnType<typeof store.getState>; 组件/页面/Scrap.tsx import { useEffect } from 'react'; import { useScrapeUrlQuery } from '../../api/scrape-api'; const Scrape = () => { const { data, error, isLoading } = useScrapeUrlQuery( 'https://somewebsite.com' ); useEffect(() => { if (error) { console.log(error); } }, [data, error, isLoading]); return ( <div> <h1>I'm the scrape page</h1> {isLoading && <div>Loading...</div>} </div> ); }; export default Scrape; 希望你已经解决了这个问题,我和你有同样的问题(GH讨论),也向后端发送了一个URL。 在我的例子中,请求发送到 localhost:5173(Vite 端口正在运行 React 应用程序)。 我的问题是发送原始 URL。我在我的 URL 中添加了一个 encodeURIComponent,之后请求被发送到我的 RTK api 中的指定 URL。 在 api/scrape-api.ts 中将其更改为 scrapeUrl: builder.query<scrapeModel, string>({ query: url => `scrape?url=${encodeURIComponent(url)}` })

回答 2 投票 0

本地主机给出错误“ERR_NAME_NOT_RESOLVED”

我正在尝试使用我的 localhost 运行一些 php 文件。我已经安装了 wamp 并且运行良好。我在“www”目录中创建了一个文件夹,当我运行本地主机时该文件夹是可见的。现在我

回答 2 投票 0

AppwriteException:用户(角色:来宾)缺少范围(帐户),创建会话后无法获取帐户

在 account.get() 行上抛出错误 过去三天一直困扰着这个问题,有人可以帮助我吗? 注册帐户控制器代码: const User = require('../model/User'); const { 客户,账户 } = r...

回答 2 投票 0

本地主机无法与全新安装的 Symfony 配合使用

我知道上面有一个线程(“Symfony 全新安装无法在我的本地主机上运行”),但该解决方案对我没有帮助。 我是 Symfony 的新手,我尝试创建我的第一个项目。我安装...

回答 2 投票 0

Node Express app.listen(PORT) 给出错误:getaddrinfo ENOTFOUND base

我正在运行一个内置于 Node 的 Express 服务器,并希望使用 app.listen 将其绑定到我的本地主机,这是我的 server.js 文件中的命令。 “严格使用”; 常量应用程序 = 要求(&...

回答 1 投票 0

如何从本地服务的 Angular 应用程序访问我的 Api?

我在本地部署了 API,使用 .NET Core 5 构建,其 CORS 配置为接受来自任何网站或客户端的任何请求,它也在我的网络本地运行,因此我可以从其他地方访问我的 API...

回答 1 投票 0

无法加载 .gltf 文件以在我的 React 网站中使用 iwith Three.js

我的项目的公共文件夹中有 3D 模型的 .gltf 文件,然后我使用“npx gltfjsx filename”命令从 .gltf 文件生成 .js React 组件。在那个 .js 文件中我

回答 1 投票 0

无法通过手机访问本地主机

我在论坛上阅读了很多答案,但我无法连接到我的电脑服务器。这是我尝试过的:- 1)通过connectify制作wifi热点。 2)使用connectify的pc ip作为连接的url...

回答 3 投票 0

缺少 GMP PHP 扩展

我想测试运行一个完全开发的网站。当我位于名为“Viserlab 的 Easy Installer”的位置“localhost/install/”时,显示需要 GMP PHP 扩展。 ...

回答 2 投票 0

当我使用全新安装的 IIS 10 访问默认网站时,它会将我重定向到“http://localhost/installation/index.php”。为什么?

当我使用全新安装的 Windows 10 IIS 10 访问默认网站时,它会将我重定向到“http://localhost/installation/index.php”。为什么? 即使我有一个“localhost/index.htm”,它...

回答 1 投票 0

ReferenceError:文档未定义(javascript)

在这里输入图片描述为什么安装完node.js后,运行各种javascript命令的代码后会出现这样的错误,看来不是因为代码错误而是因为n...

回答 1 投票 0

找不到页面(404) 请求方式:POST 请求网址:http://127.0.0.1:8000/login/login/

我将用户注册详细信息存储在数据库中,但是当我尝试使用输入的数据登录时,它不起作用;相反,它显示以下消息。 在此输入图像描述

回答 1 投票 0

Jupyter Notebok - ConnectionResetError:[WinError 10054]现有连接被远程主机强制关闭

我一直面临这个问题,Jupyter 笔记本终端关闭,从而关闭了我当时正在使用的所有 python 内核。终端显示此错误消息:

回答 1 投票 0

为什么 apache 在 OSX 上会拒绝连接到 localhost 127.0.0.1?

当尝试访问本地主机上的站点时,连接被拒绝。两天前,配置的多个虚拟主机的设置工作正常,没有出现任何问题。我不知道有任何变化...

回答 5 投票 0

Vue 应用程序编译成功,但未在浏览器中加载

我有一个 Vue 应用程序,在 npm runserve 后在控制台中输出以下内容。 DONE 17450ms 编译成功...

回答 2 投票 0

如何将图像和音频文件合并到单个视频中?

我正在使用 next js 创建一个 Web 应用程序。 我想通过组合三个图像和一个音轨来创建一个视频,以便每个图像的显示时间相同

回答 1 投票 0

为什么我在连接到本地主机后仍然收到 Spring Boot 白标签错误页面,甚至在输入正确的 url 后也是如此?

在我的 Spring Boot 应用程序中,我创建了一个 RequestMapping 注释,该注释路由到 url:localhost:5001/api/fooddish。 然而,当我在网络浏览器中输入它时,我收到 404 错误。我学会了

回答 1 投票 0

本地服务器测试

嘿伙计们,如果可能的话需要一些帮助- 我有一个网页和一个快速服务器。在我使用触摸屏的笔记本电脑上一切正常。问题是,当我运行实时服务器并通过我的...

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.