I'm trying to set up swagger-editor locally.
After cloning, I ran it using npm start but it never works on the browser .
and the browser gives the error:
This page isn’t working localhost sent an invalid response.
ERR_INVALID_REDIRECT
My nodejs version is 10.16.1 and npm version is 6.9.0.
Does it work only with 6.x version of nodejs? Did I miss anything here?
Or is there any other tool for setting up swagger-editor locally or using it?
Thanks.
Related
CommandError:
It looks like node.js and/or npm is not installed or cannot be found.
Visit https://nodejs.org to download and install node.js for your system.
If you have npm installed and still getting this error message, set NPM_BIN_PATH variable in settings.py to match path of NPM executable in your system.
Example:
NPM_BIN_PATH = "/usr/local/bin/npm"
For windows user, add
NPM_BIN_PATH = "C:/Program Files/nodejs/npm.cmd"
to settings.py
In order to find out if Node is installed on your hosting environment, you can use:
node -v
If this returns a version, then it is an indicator that there is NodeJS installed by default. And to find out the full path to the node binary, use:
whereis node
OR
which node
Once you got the full path, define it inside the settings.py of your Django.
However, if you still experience difficulties with that, I would strongly recommend finding a managed NodeJS web hosting provider that will natively have NodeJS and their support can help with such questions.
I need to work on an existing Big Commerce site.
I've downloaded and installed Stencil CLI with no issues.
I've logged into my BigCommerce site and set up a Stencil API Token, I've downloaded the theme, extracted it and run npm install. I then ran:
stencil init --url https://yourstore.com/ --token 19d3ae6-dc15-4af9-bead-a2c703aa7b --port 3000
with no issues. Then ran stencil start.
However, I get the error:
not ok -- Error: The BigCommerce Store you are pointing to either does
not exist or is not available at this time. Error details: Request
failed with status code 404
I've tried both my store's URL and https://store-12345.mybigcommerce.com/ and ensured there was a / at the end of the url.
The site loads fine - I can access the front end without issue.
I've running version 3.2.1 of Stencil and version 12.18.3 of node.
Would anyone know what I should be doing?
As a workaround, this may help -- it suggests disabling ssl checks and since the cli is only used for dev purposes this isn't a dangerous decision. :)
I used https://stuk.github.io/jszip/ on my local machine and update all dependency by npm and used command grunt connect but this only showing web server started but on this url its not working.
$ grunt connect
Running "connect:server" (connect) task
Started connect web server on http://localhost:9999
Done, without errors.
even i have tested the app there is no error,
can anyone let me know how to get such type of projects from git-hub and run locally by npm or composer/bower.
I have used simple javascript instead of going with NodeJs and here my code is :
Here is Gist Code you can run.
I am currently breaking down a swagger.json file following this guide: https://github.com/swagger-api/swagger-spec/blob/master/guidelines/REUSE.md
I made a mistake somewhere, and I would like to use the swagger-tools to find out where is my problem. When I run the tool, it just get stuck and doesn't produce any output.
I am using a localhost server, and my $ref are pointing to the localhost using absolute URLs such as:
"$ref": "http://localhost:8080/api-docs/v1/parameters.json#/myParameter"
I tried running using the file from the filesystem or served by the local server: none is working.
swagger-tools validate http://localhost:8080/api-docs/v1/swagger.json
However, if I shutdown the server and try to validate from the file system, the tools complains that it cannot resolve the references so somehow that proves that the file is parsed and swagger-tools tries to validate it.
Platform: Windows 7 Pro
Powershell
npm --version: 2.11.3
swagger-tools --version: 0.9.2
installed using npm -g install
I found the solution: the problem was coming from self-references in the definitions file that were using absolute URLs.
Using relative reference such as:
"$ref" : "#/myReference"
solved the issue and the swagger-tools validate is now working as expected.
I started suspecting something like that when I looked at the Node.js process and saw it was consuming 1.2 Go RAM and 25% CPU.
Ok, let's make it simple :
I migrated my working node.js app to a new server today. The app spawns casperjs processes to do stuff.
Problem :
It doesn't run anymore
Why?
output casperjs --version from any folder but the one where my node app is installed :
root#xxxxx:/var# casperjs --version
1.1.0-beta3
now from the folder where my node app is installed :
root#xxxxx:/var/nodeapp# casperjs --version
Error: Cannot find module 'sys'
phantomjs://bootstrap.js:289
phantomjs://bootstrap.js:254 in require
/var/nodeapp/node_modules/system/engines/node/system.js:8
/var/nodeapp/node_modules/system/engines/node/system.js:45
1.1.0-beta3
Isn't that weird? :D Thanks for any insights
Edit : Tried uninstalling casper, then reinstalling from npm (I used github before). Same error.
-DEV was the previous version (see https://github.com/n1k0/casperjs/commit/9f510ed68010b3fadc8842115a12d2712213779d#diff-b9cfc7f2cdf78a7f4b91a753d10865a2 ), up to about 4 months ago. So 1.1-beta2 should give you that.
You could also try getting the latest git version; you can see a list of changes since 1.1.0-beta3 here (I don't spot your problem though): https://github.com/n1k0/casperjs/compare/1.1-beta3...master
By the way, are you running the same PhantomJS version on each of the working and non-working server? (Actually, what I would do next is upgrade your other server to first CasperJS 1.1-beta3, then the latest PhantomJS, and see if it breaks. If not, then it is not the software version but something else about the environment of the new server.)