我试图在我的表面上运行一个 React 项目作为开发服务器,如果给我下面和标题中显示的错误。当我在我的电脑上运行相同的配置时,我没有遇到这个问题。(我尝试创建相同的条件,但它不起作用)。
错误:
./src/assets/scss/black-dashboard-pro-react.scss?v=1.0.0 (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-5-3!./node_modules/sass-loader/lib/loader.js??ref--6-oneOf-5-4!./src/assets/scss/black-dashboard-pro-react.scss?v=1.0.0)
Error: resolve-url-loader: CSS error
source-map information is not available at url() declaration (found orphan CR, try removeCR option)
Run Code Online (Sandbox Code Playgroud)
来自浏览器控制台的完整错误:(Chrome)
Fetch API cannot load file:///C:/Users/Max-T/Documents/Sources/StaffMangerV2/Oauth2Manager-Web/src/assets/scss/black-dashboard-pro-react.scss. URL scheme must be "http" or "https" for CORS request.
(anonymous) @ index.js:1679
s @ index.js:499
(anonymous) @ index.js:479
e.<computed> @ index.js:536
S @ index.js:1517
i @ index.js:1534
(anonymous) @ index.js:1541
(anonymous) @ index.js:1530
(anonymous) @ index.js:1699
(anonymous) @ index.js:1673
s @ index.js:499
(anonymous) @ index.js:479
e.<computed> @ index.js:536
S …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在一个项目中安装 node-sass,该项目在我的电脑上完美构建和运行,但在我的表面上,我在尝试安装软件包时遇到了重大问题。
注意:我已经多次尝试重新安装和重建项目。
错误总结:
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Max-T\Documents\Sources\StaffMangerV2\black-dashboard-pro-react-v1.0.0\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Max-T\\Documents\\Sources\\StaffMangerV2\\black-dashboard-pro-react-v1.0.0\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Max-T\Documents\Sources\StaffMangerV2\black-dashboard-pro-react-v1.0.0\node_modules\node-sass
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: …
Run Code Online (Sandbox Code Playgroud) 我是 Swagger.io 的新手,也是 Spring Fox 的新手。我遇到的问题是,由于某种原因,一个对象没有正确引用其模型。
错误是因为 JSON 中的结果如下:
"schema": {
"$ref": "#/definitions/Error-ModelName{namespace='online.staffmanager.backend.auth.model.dto', name='UserChangeSet'}"
}
Run Code Online (Sandbox Code Playgroud)
如果我将其更改为:
"schema": {
"$ref": "#/definitions/UserChangeSet"
}
Run Code Online (Sandbox Code Playgroud)
它确实有效。我不知道为什么注释会这样映射。
我的注释:
@Operation(
tags = "auth",
summary = "Create a new User Account",
responses = {
@ApiResponse(
responseCode = "200",
content = @Content(schema = @Schema(implementation = TokenInfo.class))),
@ApiResponse(
responseCode = "201",
content = @Content(schema = @Schema(implementation = UserChangeSet.class)))
}
)
Run Code Online (Sandbox Code Playgroud)
SpringFox配置:
@Configuration
@EnableSwagger2
@EnableWebMvc
public class SpringFoxConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any()) …
Run Code Online (Sandbox Code Playgroud) 我想切断我的字符串"ftp://user:password@ftp.domain.com:21"
以将每篇文章放在一个字符串中
换句话说,我想要:
String ftp = "ftp.domain.com"
String user = "user"
String password = "password"
String port = "21"
Run Code Online (Sandbox Code Playgroud)
这段代码有效,但有点脏,对吧?
String fullFtpAdress = "ftp://user:password@ftp.domain.com:21";
fullFtpAdress = fullFtpAdress.substring(6);
String[] parts1 = fullFtpAdress.split(":",2);
String user = parts1[0];
String[] parts2 = parts1[1].split("@");
String password = parts2[0];
String[] parts3 = parts2[1].split(":");
String ftp = parts3[0];
String port = parts3[1];
Run Code Online (Sandbox Code Playgroud)
你有其他解决方案吗?
谢谢 :)
由于错误,我需要在我的头文件和 Cpp 中实现一个头文件保护,因为在我不知道出了什么问题之前我从未使用过它,因为在某些类上它可以工作,而在一个类上它不会......最初问题更大,但我想我把它缩小到问题的根源。
LedHandler.h
#ifdef LED_HANDLER_H
#define LED_HANDLER_H
#include <Arduino.h>
#include <Adafruit_NeoPixel.h>
#include <FastLED.h>
/* #include "Led/LedFunction.h"
#include "Led/LedStates.h"
#include "Led/Fading.h" */
class LedHandler {
public:
LedHandler(int length, uint16_t pin);
void clear();
void show();
void setColor(int s, int r, int g, int b);
Adafruit_NeoPixel getStrip();
int getLength();
private:
/* LedStates ¤tState;
LedStates &targetState;
Fader<LedStates> &ledFader; */
int length;
Adafruit_NeoPixel strip;
CRGB* leds;
};
#endif
Run Code Online (Sandbox Code Playgroud)
LedHandler.cpp
#ifdef LED_HANDLER_H
#define LED_HANDLER_H
#include <Adafruit_NeoPixel.h>
#include <FastLED.h
#include "Handlers/LedHandler.h"
LedHandler::LedHandler(int length, uint16_t pin) { …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在 create-react-app 应用程序中导入 got ( https://www.npmjs.com/package/got ),当我只是尝试将其导入到一个文件中时,甚至不尝试执行任何代码应用程序无法编译,我收到以下错误:
util.js:601 Uncaught TypeError: The "original" argument must be of type Function
at Object.promisify (util.js:601)
at Object.<anonymous> (get-body-size.js:7)
at Object../node_modules/got/dist/source/utils/get-body-size.js (get-body-size.js:30)
at __webpack_require__ (bootstrap:784)
at fn (bootstrap:150)
at Object.<anonymous> (normalize-arguments.js:15)
at Object../node_modules/got/dist/source/normalize-arguments.js (normalize-arguments.js:441)
at __webpack_require__ (bootstrap:784)
at fn (bootstrap:150)
at Object.<anonymous> (as-promise.js:8)
at Object../node_modules/got/dist/source/as-promise.js (as-promise.js:152)
at __webpack_require__ (bootstrap:784)
at fn (bootstrap:150)
at Object../node_modules/got/dist/source/create.js (create.js:4)
at __webpack_require__ (bootstrap:784)
at fn (bootstrap:150)
at Object../node_modules/got/dist/source/index.js (index.js:7)
at __webpack_require__ (bootstrap:784)
at fn (bootstrap:150)
at Object../src/utils/ph_loader.js (ph_loader.js:1)
at __webpack_require__ …
Run Code Online (Sandbox Code Playgroud) npm ×3
node-sass ×2
node.js ×2
reactjs ×2
arduino ×1
c++ ×1
esp8266 ×1
ftp ×1
java ×1
javascript ×1
node.js-got ×1
npm-install ×1
platformio ×1
split ×1
spring-boot ×1
springfox ×1
string ×1
swagger ×1
swagger-ui ×1