NodeJS折騰記--------------------------------------- Mac OSX 1. 刪除/usr/local/lib中的所有node和node_modules 2
2015.10.22
開始提出MPEG_DASH dynamic adaptive streaming over http
DASH——RTMP(flash)——HLS(Apple,用於移動端較多)——HDS(Adobe)——MSS(微軟)自適應位元速率
flv,mp4,3gpp/mp4(dash),mpeg-ts(hls)
dash:一個mpd檔案和檔案片段
開發語言:js
開發工具:Node.js (tibao 說他們開發H5用的webstorm啊)
node及npm安裝:
http://nodejs.org/download/ 下載安裝檔案
在mac上下載pkg檔案
node及npm解除安裝:(mac)
Mac OSX
1. 刪除/usr/local/lib中的所有node和node_modules
2. 刪除/usr/local/lib中的所有node和node_modules的資料夾
3. 如果是從brew安裝的, 執行brew uninstall node
4. 檢查~/中所有的local, lib或者include資料夾, 刪除裡面所有node和node_modules
5. 在/usr/local/bin中, 刪除所有node的可執行檔案
6. 最後執行以下程式碼:(可能具體安裝路徑會有區別 ,find ~ -name "node" 可以找到所有
---------------------------------------sudo rm /usr/local/bin/npm sudo rm /usr/local/share/man/man1/node.1 sudo rm /usr/local/lib/dtrace/node.d sudo rm -rf ~/.npm sudo rm -rf ~/.node-gyp sudo rm /opt/local/bin/node sudo rm /opt/local/include/node sudo rm -rf /opt/local/lib/node_modules
Linux
1. 如果是apt-get安裝的, 直接
sudo apt-get remove nodejs
2. 如果不是:
rm -r bin/node bin/node-waf include/node lib/node lib/pkgconfig/nodejs.pc share/man/man1/node.1
(為什麼這裡一設定程式碼格式所有內容就消失...)
2015.10.23
操作步驟:
1. cmd調出Dos命令列
檢驗node –v
npm -v
2. 輸入:npm install –g grunt –cli
此時會安裝grunt,應該會在環境變數中新增全域性變數,grunt命令不被識別
將npm安裝目錄下的node_modules資料夾、grunt、grunt.cmd複製到工作目錄
3. 輸入:npm install
必須要有package.json和GruntFile.js檔案
輸入:npm install grunt-contrib-watch
npm installgrunt-contrib-jshint
npm installgrunt-contrib-uglify
貌似有網路錯誤,重新輸入命令安裝即可
npm installgrunt-contrib-qunit (這個要安裝比較久)
npm installgrunt-contrib-concat
npm installgrunt-contrib-clean
npm installgrunt-contrib-copy
npm installgrunt-contrib-cssmin (下載了所有標註星號的)
npm installgrunt-contrib-connect 安裝這個居然出現了不斷刷屏的ERROR LOG,後來提示Callback called more than once. 停止刷屏後重新安裝即可
-------------------分割線,以上是看dash開源專案,並沒有部署成功-----------------------
後來下載了bemTV的hlsp2p開源專案,決定一定要看下,額,又是NodeJS
1.npm install下載錯誤
2.安裝在D盤的nodeJS依賴庫,在E盤可以使用嗎???????暫時不知道
3. 直接執行npm test,提示gulp不是內部或外部命令,額,好吧,我並沒有安裝gulp
npm install -g gulp 全域性安裝gulp
在指定專案目錄下區域性安裝gulp, npm install gulp
然而仍舊提示“gulp不是內部或外部命令”
命令列輸入“npm root -g" ,輸出 C:\Users\dell\AppData\Roaming\npm\node_modules
已設定使用者環境變數中的PATH=C:\Users\dell\AppData\Roaming\npm\node_modules,NODE_PATH=C:\Users\dell\AppData\Roaming\npm\node_modules
系統環境變數中的Path =D:\Program Files\nodejs
為神馬???
4.改換mac osx
需要使用sudo安裝命令,否則會提示許可權錯誤
直接輸入npm install會提示出錯,error: no member named "Use" in namespace....之類的錯誤
需要使用最新的npm版本,安裝命令為 sudo npm install npm-check-updates -g
-----------------------------problems
1.mac上編譯提示缺少underscore模組,但實際上存在啊
Uncaught Error: Cannot find module 'underscore'
at /Users/youku/bemtv/clappr-p2phls-plugin/2e323baca1b7f5eb112ea5556a2f7db055a7bd34.browserify:1 <- node_modules/browserify/node_modules/browser-pack/_prelude.js:1:0
使用node 4.2.6編譯時,出現如下錯誤:
In file included from ../binding.cpp:1:
../node_modules/nan/nan.h:189:68: error: too many arguments to function call,
expected at most 2, have 4
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
/Users/youku/.node-gyp/4.2.6/include/node/v8.h:4675:3: note:'New' declared here
static Local<Signature> New(
^
In file included from ../binding.cpp:1:
../node_modules/nan/nan.h:271:3: error: redefinition of 'NanNew'
NanNew<v8::StringObject, v8::Handle<v8::String> >(
^
../node_modules/nan/nan.h:264:3: note: previous definition is here
NanNew<v8::StringObject, v8::Local<v8::String> >(
^
../node_modules/nan/nan.h:289:36: error: redefinition of 'NanNew'
NAN_INLINE v8::Local<v8::RegExp> NanNew(
^
../node_modules/nan/nan.h:283:36: note: previous definition is here
NAN_INLINE v8::Local<v8::RegExp> NanNew(
^
../node_modules/nan/nan.h:301:36: error: redefinition of 'NanNew'
NAN_INLINE v8::Local<v8::RegExp> NanNew(
^
../node_modules/nan/nan.h:295:36: note: previous definition is here
NAN_INLINE v8::Local<v8::RegExp> NanNew(
^
../node_modules/nan/nan.h:481:19: error: no type named
'ExternalAsciiStringResource' in 'v8::String'; did you mean
'ExternalStringResource'?
v8::String::ExternalAsciiStringResource *resource) {
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
ExternalStringResource
/Users/youku/.node-gyp/4.2.6/include/node/v8.h:2210:19: note:
'ExternalStringResource' declared here
class V8_EXPORT ExternalStringResource
^
In file included from ../binding.cpp:1:
../node_modules/nan/nan.h:480:36: error: redefinition of 'NanNew'
NAN_INLINE v8::Local<v8::String> NanNew(
^
../node_modules/nan/nan.h:475:36: note: previous definition is here
NAN_INLINE v8::Local<v8::String> NanNew(
^
../node_modules/nan/nan.h:495:27: error: redefinition of '_NanEscapeScopeHelper'
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
^
../node_modules/nan/nan.h:490:27: note: previous definition is here
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Handle<T> val) {
^
../node_modules/nan/nan.h:511:12: error: no matching function for call to
'_NanEscapeScopeHelper'
return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
failure [with T = v8::Primitive]
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
^
../node_modules/nan/nan.h:516:12: error: no matching function for call to
'_NanEscapeScopeHelper'
return NanEscapeScope(NanNew(v8::Null(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
failure [with T = v8::Primitive]
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
^
../node_modules/nan/nan.h:521:12: error: no matching function for call to
'_NanEscapeScopeHelper'
return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
failure [with T = v8::Boolean]
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
^
../node_modules/nan/nan.h:526:12: error: no matching function for call to
'_NanEscapeScopeHelper'
return NanEscapeScope(NanNew(v8::False(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
failure [with T = v8::Boolean]
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
^
../node_modules/nan/nan.h:755:13: error: no member named 'smalloc' in namespace
'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../node_modules/nan/nan.h:766:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~
/Users/youku/.node-gyp/4.2.6/include/node/node_buffer.h:31:40: note:candidate
function not viable: no known conversion from 'uint32_t'
(aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/youku/.node-gyp/4.2.6/include/node/node_buffer.h:43:40: note:candidate
function not viable: 2nd argument ('const char *') would lose const
qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/youku/.node-gyp/4.2.6/include/node/node_buffer.h:28:40: note:candidate
function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
^
/Users/youku/.node-gyp/4.2.6/include/node/node_buffer.h:36:40: note:candidate
function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../binding.cpp:1:
../node_modules/nan/nan.h:770:12: error: no viable conversion from
'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/youku/.node-gyp/4.2.6/include/node/v8.h:210:7: note:candidate
constructor (the implicit copy constructor) not viable: no known
conversion from 'v8::MaybeLocal<v8::Object>' to 'const
v8::Local<v8::Object> &' for 1st argument
class Local {
^
/Users/youku/.node-gyp/4.2.6/include/node/v8.h:210:7: note:candidate
constructor (the implicit move constructor) not viable: no known
conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&'
for 1st argument
class Local {
^
/Users/youku/.node-gyp/4.2.6/include/node/v8.h:214:13: note:candidate template
ignored: could not match 'Local' against 'MaybeLocal'
V8_INLINE Local(Local<S> that)
^
/Users/youku/.node-gyp/4.2.6/include/node/v8.h:326:13: note:candidate template
ignored: could not match 'S *' against 'v8::MaybeLocal<v8::Object>'
V8_INLINE Local(S* that)
^
In file included from ../binding.cpp:1:
../node_modules/nan/nan.h:777:26: error: no member named 'Use' in namespace
'node::Buffer'
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
~~~~~~~~~~~~~~^
../node_modules/nan/nan.h:1809:12: error: no matching function for call to
'_NanEscapeScopeHelper'
return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
failure [with T = v8::Function]
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
^
../node_modules/nan/nan.h:1824:12: error: no matching function for call to
'_NanEscapeScopeHelper'
return NanEscapeScope(node::MakeCallback(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
failure [with T = v8::Value]
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
^
../node_modules/nan/nan.h:1897:12: error: no matching function for call to
'_NanEscapeScopeHelper'
return NanEscapeScope(handle->Get(NanNew(key)).As<v8::Object>());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
failure [with T = v8::Object]
NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
^
../node_modules/nan/nan.h:2103:12: error: no member named 'IsExternalAscii' in
'v8::String'; did you mean 'IsExternal'?
if (str->IsExternalAscii()) {
^~~~~~~~~~~~~~~
IsExternal
/Users/youku/.node-gyp/4.2.6/include/node/v8.h:2174:8: note:'IsExternal'
declared here
bool IsExternal() const;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/binding/binding.o] Error 1
gypERR!build error
gypERR!stack Error: `make` failed with exit code: 2
gypERR!stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gypERR!stack at emitTwo (events.js:87:13)
gypERR!stack at ChildProcess.emit (events.js:172:7)
gypERR!stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gypERR!System Darwin 14.1.1
gypERR!command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gypERR!cwd /Users/youku/bemtv2/clappr-p2phls-plugin/node_modules/gulp-sass/node_modules/node-sass
gypERR!node -v v4.2.6
gypERR!node-gyp -v v3.0.3
gypERR!not ok
Build failed
npmERR! Darwin 14.1.1
npmERR!argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npmERR!node v4.2.6
npmERR!npm v2.14.12
npmERR!code ELIFECYCLE
npmERR! [email protected] install: `node build.js`
使用node 0.10.34編譯時,出現 TypeError Object:keys called on non-object
使用node 0.12.8編譯時,修改了package.json中指定的module版本,但出現以下錯誤提示,安裝失敗
shasum check failed for /tmp/npm-507-53887596/registry.npmjs.org/ruglify/-/ruglify-1.0.0.tgz
相關推薦
NodeJS折騰記--------------------------------------- Mac OSX 1. 刪除/usr/local/lib中的所有node和node_modules 2
2015.10.22 開始提出MPEG_DASH dynamic adaptive streaming over http DASH——RTMP(flash)——HLS(Apple,用於移動端較多)——HDS(Adobe)——MSS(微軟)自適應位元速率 flv,mp4,
Android7.1 刪除下拉通知欄中的系統圖標(mtk)
在frameworks/base/packages/systemui/res/values/config.xml這個檔案中有如下配置: <string name="quick_settings_tiles_default" translatable="false"> wifi,bt
mac 安裝polymer cli Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/polymer-cli/node_modules/wd/build'
安裝的時候根據說明,需要使用npm install -g polymer-cli命令,但是一直提示沒有許可權, 後來增加sudo後提示如下, Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/polymer-cli/n
Permission denied: '/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/EGG-INFO/requires.txt
主要參考:https://stackoverflow.com/questions/21093002/error-could-not-create-usr-local-lib-python2-7-dist-packages-virtualenv-suppo 之前必須是sudo
OpenCV編譯錯誤:/usr/local/lib/opencv_core.so.3.1:error adding symols: DSO missing from command line
今天編譯一個c++檔案 用到opencv,編譯出錯,通過百度 解決了, 錯誤程式碼: ------------------------ root@caffe:~/thrid_week# g++ -o
刪除數據庫中所有表
arc 刪除數據庫 pre exe rom 所有 varchar lec sql use 數據庫名(是要刪除表的所在的那個數據庫的名稱)GOdeclare @sql varchar(8000)while (select count(*) from sysobjects wh
使用ldconfig命令將/usr/local/lib加入到默認庫
sage size 創建 add 麻煩 www. /usr 使用 rgb 在安裝各種軟件的時候,我們常常需要使用ldconfig命令調用系統鏈接庫,這樣往往會比較麻煩,而且每次需要使用的時候,都需要調用一次,那麽有沒有更好的方法將/usr/local/lib加入到默認的系統
nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)
錯誤 fix fcm rfi 技術 tracking markdown ont nts nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)
解決/usr/local/lib/libglog.so.0: error adding symbols: DSO missing from command line
轉自 https://blog.csdn.net/u010987458/article/details/72235408 第一步: // 檢視目錄 /usr/lib 或 /usr/local/lib的目錄下是否存在libglog.so.0 $ find libglog* libglog
mysql 快速生成刪除數據庫中所有的表的語句
HERE ble 刪除 sel rom cat sql exists cpp SELECT concat(‘DROP TABLE IF EXISTS ‘, table_name, ‘;‘) FROM information_schema.tables WHERE tabl
/lib /usr/lib /usr/local/lib區別
Welcome to my blog usr 很多人都認為是user縮寫,其實不然,是unix system resource縮寫 /lib是核心級的,/usr/lib是系統級的,/usr/local/lib是使用者級的. /lib/ — 包含許多被 /bin/ 和 /sbin/ 中
QT5 cannot find usr/local/lib, file format not recognized
首先檢視有沒有在工程檔案中新增連結庫的目錄 INCLUDEPATH += /usr/local/include //此為標頭檔案的目錄 LIBS += -L/usr/local/lib -lmodbus //此為連結的lib庫的目錄 如
npm:no such file /usr/local/lib/node_modules/vue-cli/node_modules/get-stream
Mac 使用安裝vue-cli腳手架的時候報錯 npm ERR! path /usr/local/lib/node_modules/vue-cli/node_modules/get-stream npm ERR! code ENOENT npm ERR! errno -2 npm ERR
【Linux之旅-1】VMware虛擬機器中的Centos和windows共享資料夾
一、開啟虛擬機器,進入安裝好的centos系統,點選VM頂部導航欄中的“虛擬機器”按鈕,進入子選單選擇“安裝VMware Tools”,如下圖(我的已安裝過,因此顯示的是重新安裝) 二、在cent
Win7刪除右鍵選單中“圖形屬性”和“圖形選項”
完win7作業系統後,打完驅動在桌面右鍵會出現如下兩個選項,平時沒啥用又佔用空間,那麼如何刪掉這兩個選項呢? 操作步驟: 1、在執行中輸入 regedit 確定開啟登錄檔; 2、依次單擊展開HKEY_CLASSES_ROOTDirectoryBa
File "/usr/local/lib/python3.5/site-packages/dateutil/rrule.py", line 55 raise ValueError, "Can'
終於編譯過去,結果呢?import caffe,出錯: [email protected]:~/gh-install/caffe/python$ python3 Python 3.5.5 (default, Oct 28 2018, 15:55:43) [GCC
bash: npm: command not found 和 checkPermissions Missing write access to /usr/local/lib/node_modules
bash: npm: command not found 解決方法: 官網下載最新本 https://nodejs.org/en/ checkPermissions Missing write access to /usr/local/lib/node_modules 解決
C#/.NET中刪除指定資料夾下所有檔案和資料夾的幾種方法彙總
我們知道,在C#/.NET中的System.IO名稱空間下,都是關於檔案和資料夾資訊操作的類。如果在開發中有刪除指定資料夾下所有檔案和資料夾這樣的需要,應該如何使用C#/.NET來實現這個需求呢?方法一:直接刪除整個指定資料夾使用使用Directory.Delete("資料