无法在 MacOS Catalina 上安装 Strongloop for Loopback v.3
Can't install Strongloop for Loopback v.3 on MacOS Catalina
我正在尝试了解 Loopback v3(这是他们在我工作的工作站点上使用的),并且我正在尝试按照他们的教程进行操作。其中一个步骤是安装 Strongloop
npm i -g strongloop
但它一直因这些错误(以及其他错误)而失败:
static void SetMessageHandler(Isolate* isolate,
^ 5 warnings and 4 errors generated. make: *** [Release/obj.target/debugger/src/controller.o] Error 1 gyp ERR! build
error gyp ERR! stack Error: make
failed with exit code: 2 gyp ERR!
stack at ChildProcess.onExit
(/Users/me/.nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at
ChildProcess.emit (events.js:214:7) gyp ERR! stack at
Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 19.0.0 gyp ERR! command
"/Users/me/.nvm/versions/node/v8.15.1/bin/node"
"/Users/me/.nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild" gyp ERR! cwd
/Users/me/.nvm/versions/node/v8.15.1/lib/node_modules/strongloop/node_modules/strong-debugger
gyp ERR! node -v v8.15.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok
这次安装尝试是 Node v.8,但我首先尝试使用 Node v.12,但也没有用。
我想我会尝试继续并忽略错误,但是当我到达教程的“数据源”部分时 (https://loopback.io/doc/en/lb3/Defining-data-sources.html),它失败了,我想这是因为 Strongloop没有正确安装。
The new Server Discover and Monitoring engine, pass option {
useUnifiedTopology: true } to the MongoClient constructor. Web server
listening at: http://localhost:3000 Browse your REST API at
http://localhost:3000/explorer events.js:187
throw er; // Unhandled 'error' event
^
Error: EISDIR: illegal operation on a directory, read Emitted 'error'
event on DataSource instance at:
令人沮丧,因为我不知道如何正确安装 Strongloop。非常感谢任何指点!
I'm trying to learn about Loopback v3 (which is what they are using on a job site where I'm working), and I'm trying to follow their tutorials. One of the steps is to install Strongloop
StrongLoop CLI 不是 LoopBack 开发所必需的。它已被弃用,取而代之的是更小、更专注的工具。
您可以在此处找到有关开始使用 LoopBack 的最新教程:https://loopback.io/lb3/getting-started
最重要的部分是安装 loopback-cli
而不是 strongloop
:
$ npm install -g loopback-cli
IIRC,此包没有任何需要编译的本机依赖项,因此您应该不会遇到来自 gyp
的任何构建错误。
我正在尝试了解 Loopback v3(这是他们在我工作的工作站点上使用的),并且我正在尝试按照他们的教程进行操作。其中一个步骤是安装 Strongloop
npm i -g strongloop
但它一直因这些错误(以及其他错误)而失败:
static void SetMessageHandler(Isolate* isolate, ^ 5 warnings and 4 errors generated. make: *** [Release/obj.target/debugger/src/controller.o] Error 1 gyp ERR! build error gyp ERR! stack Error:
make
failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/me/.nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Darwin 19.0.0 gyp ERR! command "/Users/me/.nvm/versions/node/v8.15.1/bin/node" "/Users/me/.nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/me/.nvm/versions/node/v8.15.1/lib/node_modules/strongloop/node_modules/strong-debugger gyp ERR! node -v v8.15.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok
这次安装尝试是 Node v.8,但我首先尝试使用 Node v.12,但也没有用。
我想我会尝试继续并忽略错误,但是当我到达教程的“数据源”部分时 (https://loopback.io/doc/en/lb3/Defining-data-sources.html),它失败了,我想这是因为 Strongloop没有正确安装。
The new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. Web server listening at: http://localhost:3000 Browse your REST API at http://localhost:3000/explorer events.js:187 throw er; // Unhandled 'error' event ^
Error: EISDIR: illegal operation on a directory, read Emitted 'error' event on DataSource instance at:
令人沮丧,因为我不知道如何正确安装 Strongloop。非常感谢任何指点!
I'm trying to learn about Loopback v3 (which is what they are using on a job site where I'm working), and I'm trying to follow their tutorials. One of the steps is to install Strongloop
StrongLoop CLI 不是 LoopBack 开发所必需的。它已被弃用,取而代之的是更小、更专注的工具。
您可以在此处找到有关开始使用 LoopBack 的最新教程:https://loopback.io/lb3/getting-started
最重要的部分是安装 loopback-cli
而不是 strongloop
:
$ npm install -g loopback-cli
IIRC,此包没有任何需要编译的本机依赖项,因此您应该不会遇到来自 gyp
的任何构建错误。