0
我無法安裝解析服務器。安裝解析服務器
sudo npm install -g parse-server
/usr/local/bin/parse-server -> /usr/local/lib/node_modules/parse-server/bin/parse-server
> [email protected] install /usr/local/lib/node_modules/parse-server/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v46-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v46 ABI) (falling back to source compile with node-gyp)
gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/archie/.node-gyp/4.7.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/.node-gyp"
make: Entering directory '/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/build'
make: *** No rule to make target '../.node-gyp/4.7.2/include/node/common.gypi', needed by 'Makefile'. Stop.
make: Leaving directory '/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.10.0-24-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /usr/local/lib/node_modules/parse-server/node_modules/bcrypt
gyp ERR! node -v v4.7.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:854:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
node-pre-gyp ERR! System Linux 4.10.0-24-generic
node-pre-gyp ERR! command "/usr/bin/nodejs" "/usr/local/lib/node_modules/parse-server/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/parse-server/node_modules/bcrypt
node-pre-gyp ERR! node -v v4.7.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/nodejs /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding' (1)
如何解決
ode-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v46-linux-x64.tar.gz
?
我仍然得到 節點預GYP-ERR!試圖下載(404):https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v46-linux-x64.tar.gz 節點-pre-gyp ERR!未找到[email protected]和[email protected](node-v46 ABI)的預構建二進制文件(回退到使用node-gyp編譯的源代碼) – Arsenius
即使我運行分析服務器,它也會給出另一個錯誤嘗試添加一些記錄: 錯誤:錯誤處理請求:[TypeError:classesWithMasterOnlyAccess.includes不是函數] 錯誤:未捕獲到內部服務器錯誤。 [TypeError:classesWithMasterOnlyAccess.includes不是函數] TypeError:classesWithMasterOnlyAccess.includes不是函數 at enforceRoleSecurity(/usr/local/lib/node_modules/parse-server/lib/rest.js:162:35) at Object .create(/usr/local/lib/node_modules/parse-server/lib/rest.js:122:3) ... – Arsenius
確定問題已修復。我的nodejs太舊了。我剛剛更新到6.x,它的工作原理 – Arsenius