Buildfire CLI issue with running command lines - buildfire

I'm having an issue with using the Buildfire CLI commands for starting a new project. I am able to start the CLI and buildfire init but I'm not able to update the SDK with buildfire update or start up a React or Angular project with buildfire run <pluginName>.
Buildfire is installed globally.
The error provided is "Please run this command inside the SDK's folder" but I'm running each command within the "BuildfireSDK" folder.
Is there a file structure to follow in order to run command lines?

Regarding the buildfire run command, the third parameter is optional and it's not the plugin name. (It's actually the port number.) You should be able to run the tester just specifying buildfire run.
For the buildfire update command, are you running it in the root BuildfireSDK folder? I tried it just now on my own machine and it worked without issue. (You will see that message if you run the command in a subfolder of BuildfireSDK.)

Related

How do I run and debug NodeJS projects from Visual Studio through a set of scripts instead of "npm start"?

Using Visual Studio 2019, I have downloaded all the dependencies needed to run NodeJS scripts and all works well. I can only run each .js script from VS (Ctrl+F5), but I want to know whether its possible to run a series of scripts like I would normally do via command prompt using npm start, but in real-time through VS? It's very important to me that I do not modify any script file in order to make this work, but rather let VS do the job instead of npm start, if It's possible at all.
I already have a project setup which I can successfully run via command prompt with npm start, but can I run and debug it with VS?
My main goal is to get any console output and even use breakpoints, aka. properly debug my code.
Actually, in VS IDE, there is a default node js project template that Microsoft provided.
You only have to install the workload Node.js development on the vs_installer so that you can use that template.
I think you should create such project template which follows the rule of VS IDE with node.js. And then migrate your old project's content into this new project.
Note: in this project, there is no such easy way to start several js files at the same time unless you nest nested js methods in the starting js file. And other types of projects do the same.
If you want to debug other js files, you only need to right-click on the file on the Solution Explorer. Every time switch like this, you can debug other js files.
You do not have to use npm start in this way and just click Debug to debug the project.
I am not sure about Visual studio, but you can debug on Visual Studio Code.
you can debug from run menu.

I can't start my NextJS js app using plesk

I'm trying to start a NextJS application on my Node server using Plesk but it is not working. I activated NodeJS for my Plesk environment, and I was able to run npm install and npm build, but now, when I try to start the application, Plesk only shows "Please wait" and stays like that with no change, I have been waiting for more than 2 hours now, but I don't get any results, no errors, nothing.
The only issue I can think of is that, according to what I could find, the Application startup file and the package.json file should be in the same directory, the root folder, but in my case this is not possible. I have my package.json in the root directory, but the startup file for NextJS, index.js, is inside the pages folder. I tested building and starting the app locally and everything works fine, I don't understand why it's not working with Plesk.
I was able to fix this after correcting the startup file, it should be "node_modules/.bin/next" and not "pages/index.js".
Also when you start your app, Plesk will tell you to wait. Just check the site and make sure it is running, if it is, you can close Plesk.
You might need to install Express in your Next.js
You may refer to this repo fmi # https://github.com/zeit/next.js/tree/canary/examples/custom-server-express
If you're referring to the package.json's command we'll have:
dev
build
start
In Plesk's Node Application extension.
Website & Domains > "Your Domain" > Enable Node.js
Simply set server.js as my Application Startup File.
Ensure that all dependencies is installed using "Npm Install" helper.
You must run build command before start command.
Screenshot:
Helpful NPM/Plesk reference:
Running scripts in Node.js Application
Adding .npmrc file in Node.js Application Root folder

NodeJs Plugin Installation not found in Jenkins/configure

I am trying to configure Jenkins to build my code using NodeJS Plugin. I have installed NodeJS plugin but NodeJS Installation are not available in System Configuration.
ManageJenkins -> Configure System -> NodeJS installation (not
available)
I am running Jenkins on localhost.
What can I do to resolve this issue?
Have you installed and followed the instruction mentioned in node.js plugin? It is quite straight forward:
After installing the plugin, go to the global jenkins configuration
panel (JENKINS_HOME/configure or JENKINS_HOME/configureTools if
using jenkins 2), and add new NodeJS installations For every Nodejs
installation, you can choose to install some global npm packages.
Now, go to a job configuration screen, you will have 2 new items :
On the "Build environnment" section, you will be able to pick one of
the NodeJS installations to provide its bin/ folder to the PATH.
This way, during shell build scripts, you will have some npm
executables available to the command line (like bower or grunt)
Go to a job configuration screen, you will have 2 new items : On the
"Build environnment" section, you will be able to pick one of the
NodeJS installations to provide its bin/ folder to the PATH. This
way, during shell build scripts, you will have some npm executables
available to the command line (like bower or grunt)
You have to goto "/pluginManager/advanced" and run "check now" so that it will check the nodejs site and do the global install.
This will solve your problem

Swagger project edit doesn't do anything

I have a strange situation where I've been developing an app on my windows machine but when I run the same command for starting swagger on my Mac, it doesn't do anything.
When I run swagger project edit, it simply executes the script and there doesn't seem to be any errors or executions of any sort.
Thoughts?
I had to uninstall the swagger-cli tool and ensure I had both swagger-cli and swagger installed globally.

Set up an xcode bot to build and deploy a nodejs express server

I am attempting to set up a xcode project and bot that will build a nodejs application on commit from a github repository and restart the server after the build completes. The bot is currently picking up on the repository changes but fails to build correctly.
I am using a xcode external build tool project that uses /bin/bash as the tool path and the working directory is set to the local repository path.
The bot's after integration script is something like,
npm install --production
npm run build
npm run server:restart
I am getting errors like [npm|node] is not recognized.
Just looking for some clarity to what I might be missing or what could be going wrong.
Add this to the beginning of your script and review the output:
which node
set | grep PATH
This will happen if node is not in your path, which may happen because build scripts have a pretty basic environment - they're not running as a normal user. You may need to add it to your PATH at the start of your build script.

Resources