Home Php C# Sql C C++ Javascript Python Java Go Android Git Linux Asp.net Django .net Node.js Ios Xcode Cocoa Iphone Mysql Tomcat Mongodb Bash Objective-c Scala Visual-studio Apache Elasticsearch Jar Eclipse Jquery Ruby-on-rails Ruby Rubygems Android-studio Spring Lua Sqlite Emacs Ubuntu Perl Docker Swift Amazon-web-services Svn Html Ajax Xml Java-ee Maven Intellij-idea Rvm Macos Unix Css Ipad Postgresql Css3 Json Windows-server Vue.js Typescript Oracle Hibernate Internet-explorer Github Tensorflow Laravel Symfony Redis Html5 Google-app-engine Nginx Firefox Sqlalchemy Lucene Erlang Flask Vim Solr Webview Facebook Zend-framework Virtualenv Nosql Ide Twitter Safari Flutter Bundle Phonegap Centos Sphinx Actionscript Tornado Register | Login | Edit Tags | New Questions | 繁体 | 简体


10 questions online user: 10

0
votes
answers
47 views
+10

使用nvm卸載node.js的當前活動版本

0

在Ubuntu 16.04上,我錯誤地使用root來安裝nvm,然後通過nvm安裝node.js 8.8.1。我也用nvm alias default 8.8.1,認爲它會糾正我的錯誤。使用nvm卸載node.js的當前活動版本

現在我想:

  1. 刪除默認別名
  2. 卸載節點8.8.1
  3. 卸載NPM 4.8.5,它與節點
  4. 卸載NVM
  5. 來了正確地爲正確的非sudo用戶重新安裝所有內容

它看起來像我已經與第一部分成功:

# nvm unalias default 
Deleted alias default - restore it with `nvm alias "default" "8.8.1"` 

但NVM拒絕卸載節點8.8.1,因爲它是唯一安裝的版本:

# nvm uninstall 8.8.1                                
nvm: Cannot uninstall currently-active node version, v8.8.1 (inferred from 8.8.1). 

我猜測我首先需要取消激活節點8.8.1,但我看不到nvm --help的輸出中會出現這種情況。

在重新正確安裝所有內容之前,需要執行哪些步驟才能從機器中完全刪除node.js,npm和nvm?

沙发
0
2

第一類型

$ nvm deactivate 

然後輸入

$ nvm uninstall 8.8.1 
0
votes
answers
66 views
+10

如何創建React Native組件庫?

2

如何創建React Native組件庫?如何創建React Native組件庫?

我想用將其導入:

npm install 
沙发
0
0

您可以將其發佈在NPM,或只使用一個GitHub的依賴。這適用於任何圖書館,並沒有具體的反應。

https://docs.npmjs.com/getting-started/publishing-npm-packages

https://docs.npmjs.com/files/package.json#git-urls-as-dependencies

0
votes
answers
34 views
+10

npm安裝不安裝依賴關係 - 只是鎖定文件

0

我從來沒有任何問題npm install之前工作,所以我不確定現在的問題是什麼?npm安裝不安裝依賴關係 - 只是鎖定文件

我曾嘗試運行:

  • npm install
  • npm install --save-dev

我第一次讓我的IDE運行它(PHPStorm),它創造了node_modules文件夾,但沒有什麼是它的內部。

然後我刪除,並試圖手動運行它,但它所作的只是創建package-lock.json文件,並沒有別的,輸出功率爲:

npm notice created a lockfile as package-lock.json. You should commit this file. 
npm WARN Invalid version: "1.0" 
npm WARN www No description 
npm WARN www No repository field. 
npm WARN www No README data 
npm WARN www No license field. 

up to date in 0.087s 

現在和他們」之前,我已經有這些警告從未造成任何問題。

的package.json文件:

{ 
    "name": "**********", 
    "version": "1.0", 
    "main": "gulpfile.js", 
    "devDependencies": { 
    "autoprefixer": "^6.7.5", 
    "gulp": "^3.9.1", 
    "gulp-clean-css": "^2.0.13", 
    "gulp-concat": "^2.6.0", 
    "gulp-plumber": "^1.1.0", 
    "gulp-postcss": "^6.3.0", 
    "gulp-rename": "^1.2.2", 
    "gulp-sass": "^2.2.0", 
    "gulp-sourcemaps": "^1.6.0", 
    "gulp-uglify": "^2.0.0", 
    "gulp-util": "^3.0.7" 
    }, 
    "private": true 
} 

我然後跑npm install --save-dev --loglevel verbose這裏是輸出:

npm info it worked if it ends with ok 
npm verb cli [ 'C:\Program Files\nodejs\node.exe', 
npm verb cli 'C:\Users\Brett\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js', 
npm verb cli 'install', 
npm verb cli '--save-dev', 
npm verb cli '--loglevel', 
npm verb cli 'verbose' ] 
npm info using [email protected] 
npm info using [email protected] 
npm verb npm-session 24ddfff75bdd69e7 
npm verb correctMkdir C:UsersBrettAppDataRoaming
pm-cache\_locks correctMkdir not in flight; initializing 
npm verb lock using C:UsersBrettAppDataRoaming
pm-cache\_locksstaging-822c9c4b46ec75df.lock for D:******************
ode_modules.staging 
npm verb unlock done using C:UsersBrettAppDataRoaming
pm-cache\_locksstaging-822c9c4b46ec75df.lock for D:****************
ode_modules.staging 
npm info linkStuff !invalid#1 
npm verb linkBins !invalid#1 
npm verb linkMans !invalid#1 
npm info lifecycle undefined~install: undefined 
npm info lifecycle undefined~postinstall: undefined 
npm info lifecycle undefined~prepublish: undefined 
npm info lifecycle undefined~prepare: undefined 
npm verb saving [] 
npm verb shrinkwrap skipping write for package.json because there were no changes. 
npm info lifecycle undefined~preshrinkwrap: undefined 
npm info lifecycle undefined~shrinkwrap: undefined 
npm verb shrinkwrap skipping write for package-lock.json because there were no changes. 
npm info lifecycle undefined~postshrinkwrap: undefined 
npm WARN Invalid version: "1.0" 
npm WARN www No description 
npm WARN www No repository field. 
npm WARN www No README data 
npm WARN www No license field. 

up to date in 0.057s 
npm verb exit [ 0, true ] 
npm info ok 

問題是什麼嗎?

沙发
0
0

好吧,看起來,即使它只是一個WARN,這個問題是version.

我所要做的就是從1.0更改爲1.0.0,並開始工作。

0
votes
answers
53 views
+10

爲什麼npm install命令在節點應用程序中一次又一次地重新運行?

0

我正在經歷一個奇怪的情況。我在macOS Sierra 10.12.3中獲得了一個節點應用程序。我也得到了以下信息:爲什麼npm install命令在節點應用程序中一次又一次地重新運行?

節點-v顯示V8.4.0 NPM -v顯示5.3.0

該文件的package.json:

{ 
    "name": "myapp", 
    "version": "1.0.1", 
    "description": "My Node App", 
    "main": "app.js", 
    "scripts": { 
    "install": "npm install", 
    "test": "echo "Error: no test specified" && exit 1", 
    "start": "node app.js" 
    }, 
    "engines": { 
    "node": ">=6" 
    }, 
    "author": "blackjack", 
    "license": "ISC", 
    "dependencies": { 
    "angular": "^1.5.8" 
    } 
} 

當我運行 「故宮安裝」爲了安裝依賴關係,這些依賴關係被安裝,然而,「npm install」重新運行。事實上,它永遠不會停止運行。

看看這個:

pathfinder:myapp blackjack$ npm install --loglevel verbose 
npm info it worked if it ends with ok 
npm verb cli [ '/usr/local/bin/node', 
npm verb cli '/usr/local/bin/npm', 
npm verb cli 'install', 
npm verb cli '--loglevel', 
npm verb cli 'verbose' ] 
npm info using [email protected] 
npm info using [email protected] 
npm verb npm-session 0695436488c367c7 
npm info lifecycle [email protected]~preinstall: [email protected] 
npm verb correctMkdir /Users/blackjack/.npm/_locks correctMkdir not in flight; initializing 
npm verb lock using /Users/blackjack/.npm/_locks/staging-e02d0e92bf103f5a.lock for /Users/blackjack/dev/web/myapp/node_modules/.staging 
npm verb unlock done using /Users/blackjack/.npm/_locks/staging-e02d0e92bf103f5a.lock for /Users/blackjack/dev/web/myapp/node_modules/.staging 
npm info linkStuff [email protected] 
npm verb linkBins [email protected] 
npm verb linkMans [email protected] 
npm info lifecycle [email protected]~install: [email protected] 

> [email protected] install /Users/blackjack/dev/web/myapp 
> npm install 

npm info it worked if it ends with ok 
npm verb cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ] 
npm info using [email protected] 
npm info using [email protected] 
npm verb npm-session aeb46163714f97fa 
npm info lifecycle [email protected]~preinstall: [email protected] 
npm verb correctMkdir /Users/blackjack/.npm/_locks correctMkdir not in flight; initializing 
npm verb lock using /Users/blackjack/.npm/_locks/staging-e02d0e92bf103f5a.lock for /Users/blackjack/dev/web/myapp/node_modules/.staging 
npm verb unlock done using /Users/blackjack/.npm/_locks/staging-e02d0e92bf103f5a.lock for /Users/blackjack/dev/web/myapp/node_modules/.staging 
npm info linkStuff [email protected] 
npm verb linkBins [email protected] 
npm verb linkMans [email protected] 
npm info lifecycle [email protected]~install: [email protected] 

> [email protected] install /Users/blackjack/dev/web/myapp 
> npm install 

^C 

它永遠不會打印 「OK」,告訴它的工作如預期。 應用程序在「node app.js」命令後運行正常。但是,它阻止了AWS Beanstalk中的安裝。我看不到任何打印錯誤。

沙发
0
1

從package.json中刪除"install": "npm install",

正如您在the document中看到的那樣,npm在安裝軟件包後運行一個指定的命令。所以在這裏指定npm install將永遠運行npm install

0
votes
answers
45 views
+10

在Mac上安裝npm高sierra

2

我想在mac high sierra上安裝node.js和npm。
https://gist.github.com/rcugut/c7abd2a425bb65da3c61d8341cd4b02d
我成功通過自制軟件安裝node.js,但無法安裝NPM
我該怎麼辦?在Mac上安裝npm高sierra


Hoyeongui-MacBook-Air:~ hoyeongkim$ node -v 
v8.9.1 
Hoyeongui-MacBook-Air:~ hoyeongkim$ curl -L https://www.npmjs.com/install.sh | sh 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 6255 100 6255 0  0 2628  0 0:00:02 0:00:02 --:--:-- 2629 
tar=/usr/bin/tar 
version: 
bsdtar 2.8.3 - libarchive 2.8.3 
install [email protected] 
fetching: https://registry.npmjs.org/npm/-/npm-5.5.1.tgz 
module.js:538 
    throw err; 
    ^

Error: Cannot find module '/private/var/folders/jn/6wwl3xfd25x94ky333nhcxb80000gn/T/npm.58735/package/bin/read-package-json.js' 
    at Function.Module._resolveFilename (module.js:536:15) 
    at Function.Module._load (module.js:466:25) 
    at Function.Module.runMain (module.js:676:10) 
    at startup (bootstrap_node.js:187:16) 
    at bootstrap_node.js:608:3 
added 1 package and removed 1 package in 0.846s 
/usr/local/Cellar/node/8.9.1/bin/npm -> /usr/local/Cellar/node/8.9.1/lib/node_modules/npm/bin/npm-cli.js 
/usr/local/Cellar/node/8.9.1/bin/npx -> /usr/local/Cellar/node/8.9.1/lib/node_modules/npm/bin/npx-cli.js 
+ [email protected] 
updated 1 package in 1.687s 
It worked 

Hoyeongui-MacBook-Air:~ hoyeongkim$ npm 
-bash: npm: command not found 
+0

HTH HTTPS ://gist.github.com/DanHerbert/9520689 –

+0

@MarkSetchell T hank,但它不起作用.. –

+0

爲什麼你不想通過Homebrew安裝npm?這是最簡單的解決方案:'brew install node'。 – bfontaine

沙发
0
2

我在詳細看了這個。我安裝node自制軟件並設置我的路徑有/usr/local/bin在一開始,所以我拿起所有自制軟件二進制文件。

所以,如果我檢查node其二進制和哪個版本,我看到我運行了一個由自制安裝:

which node 
/usr/local/bin/node 

,它是版本自制安裝:

node -v 
v8.9.1 

自制軟件安裝node也自動安裝npm只是如出一轍:

which npm 
/usr/local/bin/npm 

而且也是當前:

npm -v 
5.5.1 

所以,我不知道爲什麼你想從源代碼安裝npm - 只要使用由自制提供的一個。


如果我看有自制的安裝node相關的文件,我可以看到它包括npm

brew ls node --verbose | grep 'npm$' 

樣本輸出

/usr/local/Cellar/node/8.9.1/etc/bash_completion.d/npm 
/usr/local/Cellar/node/8.9.1/libexec/bin/npm 
/usr/local/Cellar/node/8.9.1/libexec/lib/node_modules/npm/bin/npm 
0
votes
answers
61 views
+10

在文本編輯器中編輯Package.Config時,Nuget Package Restore?

0

合併兩個項目時,我們需要Install-Package幾百次。一旦編輯了Package.config,Nuget支持包還原就不會執行。它的工作方式就像Node JS包的魅力一樣?在文本編輯器中編輯Package.Config時,Nuget Package Restore?

一旦編輯了package.config,爲什麼我們不能啓動Update-Package到 恢復所有包?

enter image description here

是它的繼任者DOTNET CLI支持?

沙发
0
0

雖然packages.config講述的NuGet的軟件包下載並解壓縮(針對目標框架),安裝包的引用的過程中也可以修改.csproj的文件。所以如果你在合併後只更新其中的一個,你會發現自己有麻煩。

這個機制的繼任者是PackageReferenceNuGet blog post),它取代packages.config,只需要列出引用的包和版本(甚至一些額外的MSBuild邏輯可以通過項目管理共享版本/包等使用)。但是,沒有可用的遷移工具,因此您需要卸載所有軟件包並添加所需的軟件包引用。一些NuGet功能也發生了變化 - 例如,對文件(=>複製到項目目錄中的文件)的支持已被刪除,可能仍然會被某些項目使用(例如,假定以這種方式獲取jQuery或其他JS庫的Web項目)。

0
votes
answers
32 views
+10

錯誤,當我寫「流星故宮安裝」

0

我得到運行我的流星應用錯誤,當我寫「流星故宮安裝」

C:UsersconnectDesktophelp-er.meteorlocaluildprogramsserveroot.js:467 
W20171125-17:34:04.961(2)? (STDERR) }).run(); 
W20171125-17:34:04.961(2)? (STDERR) ^
W20171125-17:34:04.962(2)? (STDERR) 
W20171125-17:34:04.962(2)? (STDERR) Error: The babel-runtime npm package could not be found in your node_modules 
W20171125-17:34:04.963(2)? (STDERR) directory. Please run the following command to install it: 
W20171125-17:34:04.963(2)? (STDERR) 
W20171125-17:34:04.963(2)? (STDERR) meteor npm install --save babel-runtime 
W20171125-17:34:04.964(2)? (STDERR) 
W20171125-17:34:04.964(2)? (STDERR)  at babel-runtime.js (packagesabel-runtime.js:36:9) 
W20171125-17:34:04.965(2)? (STDERR)  at fileEvaluate (packagesmodules-runtime.js:343:9) 
W20171125-17:34:04.965(2)? (STDERR)  at require (packagesmodules-runtime.js:238:16) 
W20171125-17:34:04.965(2)? (STDERR)  at packagesabel-runtime.js:155:15 
W20171125-17:34:04.966(2)? (STDERR)  at packagesabel-runtime.js:166:3 
W20171125-17:34:04.966(2)? (STDERR)  at infos.forEach.info (C:UsersconnectDesktophelp-er.meteorlocaluildprogramsserveroot.js:414:13) 
W20171125-17:34:04.966(2)? (STDERR)  at Array.forEach (<anonymous>) 
W20171125-17:34:04.969(2)? (STDERR)  at C:UsersconnectDesktophelp-er.meteorlocaluildprogramsserveroot.js:413:9 
W20171125-17:34:04.969(2)? (STDERR)  at C:UsersconnectDesktophelp-er.meteorlocaluildprogramsserveroot.js:463:5 
W20171125-17:34:04.970(2)? (STDERR)  at Function.run (C:UsersconnectDesktophelp-er.meteorlocaluildprogramsserverprofile.js:510:12) 

和以下錯誤,當出現以下錯誤消息,當我運行以下命令

meteor npm install --save babel-runtime 

錯誤:

npm ERR! Error while executing: 
npm ERR! C:Program FilesGitcmdgit.EXE ls-remote -h -t https://github.com/meteor/readable-stream.git 
npm ERR! 
npm ERR! fatal: Unable to find remote helper for 'https' 
npm ERR! 
npm ERR! exited with error code: 128 

npm ERR! A complete log of this run can be found in: 
npm ERR!  C:UsersconnectAppDataRoaming
pm-cache\_logs2017-11-25T15_36_26_586Z-debug.log 

日誌文件:

0 info it worked if it ends with ok 
1 verbose cli [ 'C:\Users\connect\AppData\Local\.meteor\packages\meteor-tool\1.6.0\mt-os.windows.x86_64\dev_bundle\bin\node.exe', 
1 verbose cli 'C:\Users\connect\AppData\Local\.meteor\packages\meteor-tool\1.6.0\mt-os.windows.x86_64\dev_bundle\lib\node_modules\npm\bin\npm-cli.js', 
1 verbose cli 'install', 
1 verbose cli '--save', 
1 verbose cli 'babel-runtime' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose npm-session f78dcd8e95220926 
5 silly install loadCurrentTree 
6 silly install readLocalPackageData 
7 http fetch GET 304 https://registry.npmjs.org/babel-runtime 786ms (from cache) 
8 silly pacote range manifest for [email protected]^6.26.0 fetched in 1568ms 
9 silly install loadIdealTree 
10 silly install cloneCurrentTreeToIdealTree 
11 silly install loadShrinkwrap 
12 silly fetchPackageMetaData error for [email protected]+https://github.com/meteor/readable-stream.git#d64a64aa6061b9b6855feff4d09e58fb3b2e4502 Error while executing: 
12 silly fetchPackageMetaData C:Program FilesGitcmdgit.EXE ls-remote -h -t https://github.com/meteor/readable-stream.git 
12 silly fetchPackageMetaData 
12 silly fetchPackageMetaData fatal: Unable to find remote helper for 'https' 
12 silly fetchPackageMetaData 
12 silly fetchPackageMetaData exited with error code: 128 
13 verbose stack Error: exited with error code: 128 
13 verbose stack  at ChildProcess.onexit (C:UsersconnectAppDataLocal.meteorpackagesmeteor-tool1.6.0mt-os.windows.x86_64dev_bundlelib
ode_modulesend-of-streamindex.js:39:36) 
13 verbose stack  at emitTwo (events.js:125:13) 
13 verbose stack  at ChildProcess.emit (events.js:213:7) 
13 verbose stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
14 verbose cwd C:UsersconnectDesktophelp-er 
15 verbose Windows_NT 10.0.15063 
16 verbose argv "C:\Users\connect\AppData\Local\.meteor\packages\meteor-tool\1.6.0\mt-os.windows.x86_64\dev_bundle\bin\node.exe" "C:\Users\connect\AppData\Local\.meteor\packages\meteor-tool\1.6.0\mt-os.windows.x86_64\dev_bundle\lib\node_modules\npm\bin\npm-cli.js" "install" "--save" "babel-runtime" 
17 verbose node v8.8.1 
18 verbose npm v5.4.2 
19 error Error while executing: 
19 error C:Program FilesGitcmdgit.EXE ls-remote -h -t https://github.com/meteor/readable-stream.git 
19 error 
19 error fatal: Unable to find remote helper for 'https' 
19 error 
19 error exited with error code: 128 
20 verbose exit [ 1, true ] 

任何想法,爲什麼我得到這些錯誤?

+1

檢查你的日誌文件,它是有原因的 – wrangler

+0

@wrangler我不能,它告訴我,我的帖子主要是代碼,我必須把更多的細節,我不知道還有什麼可寫的 –

+0

@wrangler我將它添加爲文本 –

沙发
0
0

在Windows 10中以管理員身份在cmd shell中運行修復了類似的問題。

是越來越這是常規運行cmd shell

c:meteorsimple-todos>meteor npm install --save font-awesome 
npm ERR! Error while executing: 
npm ERR! C:Program FilesGitcmdgit.EXE ls-remote -h -t https://github.com/meteor/readable-stream.git 
npm ERR! 
npm ERR! fatal: Unable to find remote helper for 'https' 
npm ERR! 
npm ERR! exited with error code: 128 

npm ERR! A complete log of this run can be found in: 
npm ERR!  C:UsersmyuserAppDataRoaming
pm-cache\_logs2018-02-19T18_15_27_973Z-debug.log 

在CMD然後跑作爲管理員,它的工作

c:meteorsimple-todos>meteor npm i --save font-awesome 
+ [email protected] 
updated 1 package in 5.707s 
0
votes
answers
15 views
+10

錯誤

0

我嘗試使用錯誤

npm install --save font-awesome 

但是npm拋出錯誤

npm ERR! path C:UsersaDesktopCodefaTest
ode_modulesfont-awesome 
npm ERR! code ENOENT 
npm ERR! errno -4058 
npm ERR! syscall rename 
npm ERR! enoent ENOENT: no such file or directory, rename 'C:UsersaDesktopCodefaTest
ode_modulesfont-awesome' -> 'C:UsersaDesktopCodefaTest
ode_modules.font-awesome.DELETE' 
npm ERR! enoent This is related to npm not being able to find a file. 
npm ERR! enoent 

npm ERR! A complete log of this run can be found in: 
npm ERR!  C:UsersaAppDataRoaming
pm-cache\_logs2017-11-25T16_52_23_476Z-debug.log 

嘗試安裝字體真棒運行以下

npm cache clean --force 
npm install -g npm 
npm install 
npm install --save font-awesome 

,但我仍然以相同的錯誤結束。

運行Windows 10,NPM 5.5.1,節點7.9.0

任何人都得到了同樣的問題?

沙发
0
1

檢查是否有其他應用程序在後臺運行節點的實例。如果是,請嘗試終止它們,然後重試您的npm命令。

或以管理員身份運行node.js。

+0

節點在另一個虛擬桌面上運行。停止節點解決了問題。 –

板凳
0
0

切換到Yarn package manager(這樣做使我在大型項目上花了不到一個小時)。由Facebook和谷歌建立到fix the issues大家已經與npm很長一段時間了。

0
votes
answers
50 views
+10

Clio API:批量操作不返回303狀態代碼

0

我沒有看到使用最新的v4 api爲activities端點執行批量操作的303響應。Clio API:批量操作不返回303狀態代碼

The API Documentation:

  1. 請與同值真正的X BULK報頭中的動作的請求。答覆將始終爲202接受。

  2. 輪詢響應位置標題中提供的URL。此URL適用於批量操作端點。

  3. 動作完成後,輪詢URL將返回303 See Other響應。

  4. 從303的位置標題中的URL下載響應請參閱其他響應。

下面是我在做什麼:

我發出初始請求的活動與X-BULK頭設置爲'true'端點。

  • 我收到一個202 Accepted迴應,其中一個Location標頭設置爲輪詢url。

我開始輪詢從Location標題提供的url。

  • 我收到了幾200的回答與下列數據和標題:

數據:

{"data":{"id":26952539,"etag":"\"434fa52f83b8e0bb72677f60b8297866\""}} 

頁眉:

{ 
    'content-type': 'application/json; charset=utf-8', 
    'transfer-encoding': 'chunked', 
    connection: 'close', 
    vary: 'Accept-Encoding', 
    status: '200 OK', 
    'last-modified': 'Sat, 02 Dec 2017 22:17:13 GMT', 
    'x-ratelimit-limit': '50', 
    'x-ratelimit-reset': '1512253080', 
    'x-ratelimit-remaining': '45', 
    'x-request-id': '4674a764-c417-448c-af09-c6dae1cabe15', 
    etag: '"434fa52f83b8e0bb72677f60b8297866"', 
    'x-frame-options': 'SAMEORIGIN', 
    'cache-control': 'no-cache, private, no-store', 
    'x-xss-protection': '1; mode=block', 
    'x-api-version': '4.0.5', 
    'x-content-type-options': 'nosniff', 
    date: 'Sat, 02 Dec 2017 22:17:13 GMT', 
    'set-cookie': 
    [ 'XSRF-TOKEN=oQqTKV8XKRm9oiMuY1OFZ6qleZyRyvtcs9v52%2FWyeiVXxvVszHLiXsQkWelnUHs3ErSsH64ctIpehxErulAWHg%3D%3D; path=/; secure', 
    '_session_id=7babc5f94bc48ecd5d18d4b40c17d6ca; path=/; secure; HttpOnly' ], 
    server: 'nginx', 
    'strict-transport-security': 'max-age=31536000; includeSubdomains' 
} 

但是一個303永遠不會到來。一些上述200 S的後,我得到另一個200與有效載荷:

數據:

{ 
    "data": [ 
    { 
     "data": [ {id: 1...}, {id: 2...}, {id: 3...}, ... ], 
     "status": 200 
    } 
    ], 
    "status": "completed", 
    "requested": 46, 
    "performed": 46 
} 

頁眉:

{ 
    'x-amz-id-2': '1uiNt20Vd/X74JxKZKrt/hah7aof8xfhZlt7fhlDt8b3G2nA47Y8ZDaohb2drSF8ErniirRK2Es=', 
    'x-amz-request-id': '2B29557952779E29', 
    date: 'Sat, 02 Dec 2017 22:17:15 GMT', 
    'last-modified': 'Sat, 02 Dec 2017 22:17:14 GMT', 
    'x-amz-expiration': 'expiry-date="Wed, 06 Dec 2017 00:00:00 GMT", rule-id="Expiration rule (auto-generated)"', 
    etag: '"58e33e4eced83d145bf6dec9f72b97be-1"', 
    'x-amz-server-side-encryption': 'AES256', 
    'content-encoding': 'utf-8', 
    'x-amz-version-id': '2Ou7F__59Pz8WKOKZwFg_fOuhQjD5ro0', 
    'content-disposition': 'attachment; filename="activities 20171202.json";', 
    'accept-ranges': 'bytes', 
    'content-type': 'application/json', 
    'content-length': '9593', 
    server: 'AmazonS3', 
    connection: 'close' 
} 

看來我可以解決此足以通過測試status === 'completed' ,甚至檢查是否存在content-disposition標題。

我做錯了什麼,阻止了303響應,或者是否存在我忽略的activities端點的語義?

是否足夠測試status === 'completed'解決此問題?

注意:我通過Authorization標頭爲每個請求,其中包括訪問令牌。

謝謝!

+0

快速問題來幫助重現問題,您正在使用哪個工具? cURL,Postman或node.js API客戶端? –

+0

@MatthewHoag,我在Express框架中使用了一個node.js應用程序。 –

沙发
0
1

這是Clio API-V4的一個已知錯誤。 在這個時候最好的解決辦法是:

測試200的有效載荷狀態===「完成」

我們正在解決缺少303響應工作。同時我們會更新文檔。

板凳
0
1

這是我一直在使用有很好的效果解決方法:

  1. 使用查詢批量操作狀態時??參數:

    /API/V4/bulk_actions/ignore_redirect =真使用?fields=Response_Url參數獲取響應的實際URL。

  2. Response_Url屬性下載結果。

我從來沒有這些方法失敗。

0
votes
answers
25 views
+10

如何通過調色板將有限範圍的公共軟件包獲取到Node-RED中?

0

上週I published new public package to npm Node-RED使用關鍵字node-red,但到目前爲止它還沒有出現在Node-RED庫中;雖然它似乎堅持packaging instructions如何通過調色板將有限範圍的公共軟件包獲取到Node-RED中?

與其他公共軟件包不同之處在於它們是在npm上的組織下發布的。沒有其他@*包出現在Node-RED庫中,但它們在npm上執行。

如何通過Node-RED中的調色板管理器加載範圍內的公共包?

沙发
0
0

之前2018-01-04範圍包未明顯索引。現在已經爲它們添加了支持,並且我發佈的範圍內的軟件包在線顯示。

自從現在發生變化以來,大量的範圍包已經添加到流庫中。現在可以通過Node-RED中的調色板管理器來安裝它們。