我通过改造获取 JSON 数据时响应此错误。
List<NewLicense> result = null;
Call<List<NewLicense>> serviceResult = ShahrdariApp.getShahrdariWebService().getLicenses(Configuration.getInstance().getString(SharedPrefs.MAC_ADDRESS), id);
try {
Response<List<NewLicense>> response = serviceResult.execute();
result = response.body();
Log.d("responseCode", String.valueOf(response.code()) );
} catch (Exception e) {
exceptionHandling(e);
Log.d("responseCode", String.valueOf(e.getMessage()) );
}
return result;
Run Code Online (Sandbox Code Playgroud) 当我在 angular8 应用程序上使用 jasmine 运行单元测试时出现错误。我有一个服务,在这个服务中我正在注入另一个服务
@Injectable({
providedIn: 'root'
})
export class FirstService {
constructor(private http: HttpClient, private configService: ConfigurationService) { }
Run Code Online (Sandbox Code Playgroud)
当我执行 npm run test 时,总是出现错误:
AfterAll ReferenceError 中抛出错误:在 Module.ConfigurationService 初始化之前无法访问“ConfigurationService”(http://localhost:9876/_karma_webpack_/main.js:1095:112)
有什么帮助吗?
我开始尝试 vue.js。我确实遵循了建议并添加了以下开发依赖项:
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/eslint-config-prettier": "^5.0.0",
"babel-eslint": "^10.0.3",
"eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.12.0",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-template-compiler": "^2.6.10"
}
Run Code Online (Sandbox Code Playgroud)
这将在node_modules中加载大约910个模块。大小约为 180 MB。当我尝试复制或传输整个项目时,需要一分钟左右的时间来计算一万个文件。对于一个小项目来说这是很长的。
难道我做错了什么?这看起来有很多东西要随身携带。 任何提示表示赞赏。