我曾节点版本10安装在我的系统,从版本6升级我的NPM至7版本我不能安装依赖后,和我得到的错误,所以我只好我的节点降级到6,(包括npm ci和npm i不及格)我正在测试的项目是这样的:
https://github.com/Giveth/feathers-giveth
错误是这样的:
npm ERR! code 128
npm ERR! git dep preparation failed
npm ERR! command /Users/username/.nvm/versions/node/v10.23.0/bin/node /Users/username/.nvm/versions/node/v10.23.0/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/username/.npm/_cacache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 128
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command git clone --mirror -q ssh://git@github.com/gulpjs/gulp.git /Users/renjer/.npm/_cacache/_cacache/tmp/git-clone-dfb83c15/.git
npm ERR! npm ERR! fatal: destination path '/Users/username/.npm/_cacache/_cacache/tmp/git-clone-dfb83c15/.git' already exists and is not an empty …Run Code Online (Sandbox Code Playgroud) 我使用 swagger-ui-express package( https://github.com/scottie1984/swagger-ui-express) (Node.js) 并且在这个配置中工作正常:
const swaggerUi = require('swagger-ui-express');
const swaggerDocument = require('./swagger.json');
app.use('/api-docs',swaggerUi.serve, swaggerUi.setup(swaggerDocument));
Run Code Online (Sandbox Code Playgroud)
当直接进入 /api-docs 时,一切都很好,但是当我来自 nginx 时,例如host/myApp/api-docs将我重定向到host/api-docs,很明显,重定向后我得到 404
我将此依赖项添加到gradle中:
//单元测试的依赖
testCompile 'junit:junit:4.12'
Run Code Online (Sandbox Code Playgroud)
//如果要使用Hamcrest匹配器库,请设置此依赖项
testCompile 'org.hamcrest:hamcrest-library:1.3'
Run Code Online (Sandbox Code Playgroud)
//更多内容,例如Mockito
androidTestCompile 'org.mockito:mockito-core:1.+'
androidTestCompile "com.google.dexmaker:dexmaker:1.2"
androidTestCompile "com.google.dexmaker:dexmaker-mockito:1.2"
androidTestCompile 'com.android.support.test:runner:0.3'
androidTestCompile 'com.android.support.test:rules:0.3'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
Run Code Online (Sandbox Code Playgroud)
//添加此内容以获得意图模拟支持
androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2'
Run Code Online (Sandbox Code Playgroud)
//添加此内容以进行Webview测试支持
androidTestCompile 'com.android.support.test.espresso:espresso-web:2.2'
Run Code Online (Sandbox Code Playgroud)
并成功同步build.gradle,但是当我想导入此类时:
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
Run Code Online (Sandbox Code Playgroud)
IDE(Android Studio 1.2)给我一个错误,该错误无法解决符号测试,我搜索了太多,但没有找到任何答案