Hi Im installing the loopback-cli.
Running these commands:
npm install --global --production windows-build-tools
AND
npm install -g loopback-cli
The second command run rebuilding the ursa module into error. There is some link to C:\OpenSSL-Win64. What the ... is this? Some hardcoded library link?
Write me please some way how to install normally the loopback. This is from their installation site. Thanx.
Here the log:
C:\Users\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa>if not defined npm_config_node_gyp (node "C:\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
ursaNative.cc
win_delay_load_hook.cc
..\src\ursaNative.cc(157): warning C4244: 'argument': conversion from 'ssize_t' to 'int', possible loss of data [C:\Use
rs\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(172): warning C4244: 'argument': conversion from 'ssize_t' to 'int', possible loss of data [C:\Use
rs\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa\build\ursaNative.vcxproj]
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\Users\Erik\AppData\Roaming\n
pm\node_modules\loopback-cli\node_modules\ursa\build\ursaNative.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258: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 Windows_NT 10.0.15063
gyp ERR! command "C:\\nodejs\\node.exe" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ursa#0.9.4 (node_modules\loopback-cli\node_modules\ursa):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ursa#0.9.4 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ loopback-cli#4.0.0
added 3 packages and updated 1 package in 27.638s
Same issue here.
Setup before fixing:
lb -v 4.2.1 (generator-loopback#5.9.4 loopback-workspace#4.5.0)
node -v v10.13.0
OS: Windows 10 Home
I was able to fix the issue after taking the following steps:
Install node v8.12.0
Install OpenSSL 1.1 in C:\OpenSSL-Win64 (strong-ursa hard codes the location)
Create a symbolic link in C:\OpenSSL-Win64\lib named libeay64.lib which targets libcrypto.lib.
Run npm i -g windows-build-tools
Run npm i -g looback-cli again.
I'm not sure if rolling back the NodeJS version to 8.12 is necessary. There are a few widely, albeit not well documented pain points working with Loopback due to strong-ursa's use of native libraries. (Please note, this is unconfirmed information as I'm in a hurry to get back to developing the project at hand.) These steps allowed me to continue using Loopback CLI unhindered.
Useful links:
Download previous NodeJS releases: https://nodejs.org/en/download/releases/
Download OpenSSL: https://slproweb.com/products/Win32OpenSSL.html
windows-build-tools: https://github.com/felixrieseberg/windows-build-tools
https://github.com/curl/curl/issues/984
https://github.com/strongloop/loopback-cli/issues/36#issuecomment-434331508
Related
I just tried to install the graphql plugin for strapi (i.e., strapi-plugin-graphql). When I tried to install it via the admin interface, I got the following error message:
The restart takes longer than expected
The server should have restarted, please check your logs in the terminal
When I check my terminal, this is what I see:
[2019-12-27T07:47:12.612Z] debug GET /admin/plugins (5 ms) 200
[2019-12-27T07:47:15.882Z] info Installing graphql...
[2019-12-27T07:48:59.105Z] info File changed: C:\code\tutorials\react\Gatsby\strapi\startup-reporter\package.json[2019-12-27T07:48:59.279Z] debug POST /admin/plugins/install (103411 ms) 200
[2019-12-27T07:48:59.281Z] info The server is restarting
[2019-12-27T07:49:14.672Z] debug ⛔️ Server wasn't able to start properly.
[2019-12-27T07:49:14.674Z] error Error: Field "Query.news" can only be defined once.
at assertValidSDL (C:\code\tutorials\react\Gatsby\strapi\startup-reporter\node_modules\graphql\validation\validate.js:108:11)
at Object.buildASTSchema (C:\code\tutorials\react\Gatsby\strapi\startup-reporter\node_modules\graphql\utilities\buildASTSchema.js:71:34)
at Object.buildSchemaFromTypeDefinitions (C:\code\tutorials\react\Gatsby\strapi\startup-reporter\node_modules\graphql-tools\dist\generate\buildSchemaFromTypeDefinitions.js:23:28)
at makeExecutableSchema (C:\code\tutorials\react\Gatsby\strapi\startup-reporter\node_modules\graphql-tools\dist\makeExecutableSchema.js:26:29)
at Object.generateSchema (C:\code\tutorials\react\Gatsby\strapi\startup-reporter\node_modules\strapi-plugin-graphql\services\Schema.js:300:22)
at Object.initialize (C:\code\tutorials\react\Gatsby\strapi\startup-reporter\node_modules\strapi-plugin-graphql\hooks\graphql\index.js:59:50)
at Promise.resolve.then (C:\code\tutorials\react\Gatsby\strapi\startup-reporter\node_modules\strapi\lib\hooks\index.js:37:28)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! startup-reporter#0.1.0 dev: `strapi develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the startup-reporter#0.1.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\moshe\AppData\Roaming\npm-cache\_logs\2019-12-27T07_49_14_697Z-debug.log
Any idea why I am getting this error message and how to fix it?
UPDATE:
I should note that I did a fresh install of strapi and then installed the graphql plugin -- and it installed properly. It only didn't work with an installation that already had custom post types. I don't know why that is -- and what I can do to install it with those custom post types. Any ideas?
Here is the issue about this problem
https://github.com/strapi/strapi/issues/1198
Some words are not well managed for the pluralize version.
So the issue is due to that point.
There is currently nothing to do to fix it by your own.
I have Karma running Jasmine tests. I run these using npm scripts which, ultimately, use Angular CLI's ng test.
When I try to use xdescribe, xit, fdescribe, or fit, my tests run as expected, but I see an error.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! {my package#version} test-watch: `ng test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the {my package#version} test-watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm complains loudly about the error. ng test doesn't complain, but fails to go into a watch. I assume ng is also aborting because of the exit status.
Is this failed exit by design? Is it up to the reporter?
This turned out to be a failed coverage threshold. Obviously, excluding some or nearly all specs or suites greatly affected the coverage.
I'm trying to install nativescript on Windows 10 using Node 4.5.0 and am getting an error. Apparently it's trying to install version 2.2.1 of xmlbuilder (from 2014) which requires node 0.8 or 0.10.
From what I can see it's trying to install an npm node module? I don't know how to debug what's going on. Could it be something to do with nvm?
58355 info install write-file-atomic#1.1.4
58356 info postinstall write-file-atomic#1.1.4
58357 info install npm#2.15.9
58358 info postinstall npm#2.15.9
58359 verbose unlock done using C:\Users\Jason\AppData\Roaming\npm-cache\_locks\npm-2b9ada4a148d9bea.lock for C:\Program Files\nodejs\node_modules\nativescript\node_modules\npm
58360 verbose about to build C:\Program Files\nodejs\node_modules\nativescript
58361 verbose unlock done using C:\Users\Jason\AppData\Roaming\npm-cache\_locks\nativescript-a3c660f576f1098e.lock for C:\Program Files\nodejs\node_modules\nativescript
58362 verbose stack Error: Unsupported
58362 verbose stack at checkEngine (C:\Users\Jason\AppData\Roaming\nvm\v4.5.0\node_modules\npm\node_modules\npm-install-checks\index.js:16:16)
58362 verbose stack at Array.<anonymous> (C:\Users\Jason\AppData\Roaming\nvm\v4.5.0\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
58362 verbose stack at LOOP (C:\Users\Jason\AppData\Roaming\nvm\v4.5.0\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
58362 verbose stack at chain (C:\Users\Jason\AppData\Roaming\nvm\v4.5.0\node_modules\npm\node_modules\slide\lib\chain.js:20:5)
58362 verbose stack at C:\Users\Jason\AppData\Roaming\nvm\v4.5.0\node_modules\npm\lib\install.js:1038:5
58362 verbose stack at C:\Users\Jason\AppData\Roaming\nvm\v4.5.0\node_modules\npm\lib\utils\locker.js:39:7
58362 verbose stack at cb (C:\Users\Jason\AppData\Roaming\nvm\v4.5.0\node_modules\npm\node_modules\lockfile\lockfile.js:149:38)
58362 verbose stack at C:\Users\Jason\AppData\Roaming\nvm\v4.5.0\node_modules\npm\node_modules\lockfile\lockfile.js:171:16
58362 verbose stack at C:\Users\Jason\AppData\Roaming\nvm\v4.5.0\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:43:10
58362 verbose stack at FSReqWrap.oncomplete (fs.js:82:15)
58363 verbose pkgid xmlbuilder#2.2.1
58364 verbose cwd C:\Users\Jason
58365 error Windows_NT 10.0.10586
58366 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "-g" "nativescript"
58367 error node v4.5.0
58368 error npm v2.15.9
58369 error code ENOTSUP
58370 error notsup Unsupported
58370 error notsup Not compatible with your version of node/npm: xmlbuilder#2.2.1
58370 error notsup Required: {"node":"0.8.x || 0.10.x"}
58370 error notsup Actual: {"npm":"2.15.9","node":"4.5.0"}
58371 verbose exit [ 1, true ]
I have the same setup (Win-10 with node.js 4.5 and npm 2.15.9) and everything is working as expected - the NativeScript is installing from npm with no hassle.
You can try this windows node manager in order to exclude a local incompatibility with node version. With nvm you can install several nodejs version and swith within them.
For example:
nvm install 4.4.7
Will install the previous stable version and with nvm use 4.4.7 you can try to install nativescritp again and see if the error is still present.
You can also try
npm cache clean
Which will clean your entire npm cache as discussed here.
I am trying to learn MEAN stack, i've installed Node,Express,and Angular on my PC using npm, i've also installed Mongo DB and now i am trying to install Mongoose, but i am not able to install it ! i am getting the following error in the command line ! please suggest me a way to install it
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\nishanth>npm install mongoose
npm WARN peerDependencies The peer dependency kerberos#~0.0 included from mongod
b-core will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerD
ependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it
explicitly.
> kerberos#0.0.17 install C:\Users\nishanth\node_modules\mongoose\node_modules\m
ongodb\node_modules\kerberos
> (node-gyp rebuild) || (exit 0)
\
C:\Users\nishanth\node_modules\mongoose\node_modules\mongodb\node_modules\kerber
os>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_module
s\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )
else (node rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Python33", you can set th
e PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:116:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:71:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej
s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\nishanth\node_modules\mongoose\node_modules\mongodb\node_m
odules\kerberos
gyp ERR! node -v v4.2.1
v3.0.3! node-gyp -v-
gyp ERR! not ok
mongoose#4.3.5 node_modules\mongoose
├── ms#0.7.1
├── hooks-fixed#1.1.0
├── async#0.9.0
├── regexp-clone#0.0.1
├── mpromise#0.5.4
├── mpath#0.1.1
├── muri#1.0.0
├── sliced#0.0.5
├── kareem#1.0.1
├── bson#0.4.19
├── mquery#1.6.3 (debug#2.2.0, bluebird#2.9.26)
└── mongodb#2.1.2 (es6-promise#3.0.2, kerberos#0.0.17, mongodb-core#1.2.30, read
able-stream#1.0.31)
C:\Users\nishanth>
The above error clearly indicate that one of the dependency module kerberos#0.0.17 require python as dependency for installation. But it not found in your environment path. Better you should install python and set the path in environment variable. Then try to install the mongoose inside your project directory.
I have installed node.js on Windows 7 with their latest installer. It seemed to work, I can call npm and node from the console (either cmd or PowerShell), but I keep getting errors.
There are a lot of questions here about node.js on windows, but they all mention some specific piece of code. I'm getting the "spawn ENOENT" with a lot of simple commands, for instance yo, if I then pick "update generators" :
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:988:11)
at Process.ChildProcess._handle.onexit (child_process.js:779:34)
even npm faq fails :
PS E:\www\something> npm faq
npm ERR! Error: spawn ENOENT
npm ERR! at errnoException (child_process.js:988:11)
npm ERR! at Process.ChildProcess._handle.onexit (child_process.js:779:34)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/isaacs/npm/issues>
It seems that the problem is that node uses unix command names like dir, which do not exist on Windows. Some blog posts mention using Cygwin, but mostly for building node.js, not for calling it. The official nodejs website doesn't mention that cygwin is a prerequisite, either.
Here's the npm-debug.log :
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'faq' ]
2 info using npm#1.3.24
3 info using node#v0.10.25
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 error Error: spawn ENOENT
5 error at errnoException (child_process.js:988:11)
5 error at Process.ChildProcess._handle.onexit (child_process.js:779:34)
6 error If you need help, you may report this *entire* log,
6 error including the npm and node versions, at:
6 error <http://github.com/isaacs/npm/issues>
7 error System Windows_NT 6.1.7601
8 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "faq"
9 error cwd E:\
10 error node -v v0.10.25
11 error npm -v 1.3.24
12 error syscall spawn
13 error code ENOENT
14 error errno ENOENT
15 verbose exit [ 1, true ]
Make sure that you have c:\Windows\System32 on your 'Path' System Variable. I was having this exact problem and this was the fix I needed. I must have taken it out in error sometime in the past.