Bluemix DevOps Editor Syntax Error Marker - node.js

I'm new in Bluemix DevOps. I created an application based on the SDK for node.js.
I modified an HTML source to test a simple application. My application is working well. But I don't know why below errors is displayed.
What should I do?

If everything is actually working fine, it might be that jQuery isn't a part of your ESLint environment.
Does adding /*eslint-env jquery */ before the function that uses jQuery fix this?
edit: Additionally, is there an option when you click on the error to add that declaration to your file?

Related

How to debug a serverless framework plugin?

I've searched throughout google about this question and I had no success...
I want to work on a serverless plugin fix, but I don't know how to attach the process to debug the code.
Currently, I'm using vscode and the plugin was developed using nodejs + typescript.
Does anyone have any tip or article explaining how to do that?
As every other process, that you want to debug, you need to run it and somehow connect the debugger to it.
You need to remember, that Serverless Framework is written in JS/TS, so it runs in Node.js. So you can debug it quite easily, if you are developing your Lambdas in Node.js, as it's quite common environment.
How to do it using Jetbrains/Webstorm/IntelliJ
Go to your node_modules directory and find the source code of the plugin, that you want to debug.
In the source code place the breakpoint.
Now Create a new "Run configuration" in IDE for NPM, that should be similar to mine:
4. Make sure you've chosen the correct package.json!
5. Now simply start debugging, like you normally do, but choose the run configuration, that you've just created.
In my example I'm using package script from package.json, but it could be also any other script, that triggers serverless deploy or serverless print in the end.
And that's it! Breakpoints should be triggered normally, like when you debug your own JS code.

Has anybody been able to successfully get an Express app running from Azure Functions?

I'm interested to see if anybody has managed this? If so, if they could point me to some boiler plate code?
I've tried running these packages:
https://www.npmjs.com/package/azure-function-express
https://www.npmjs.com/package/azure-function-express-2
https://www.npmjs.com/package/azure-aws-serverless-express
I've also tried running these with & without using the Serverless framework all without any success.
No routes that I've set up respond as expected and I'm unable to get any response from the server at all.
After several hours of testing I managed to get this working so I created this report / template to help others get started:
https://github.com/ytsruh/azurefunction-express-template
I'm still unable to get this working via the Serverless framework as the template (Serverless template, not the above repo) appears to not be updated to working with Azure Function Runtime v2.
The other things of note, is that the folder structure appears to be very important & opinionated. Eg the function/app must be inside a folder with the associated function.json file. I'll keep searching for a way to resolve this so it can follow a more 'standard' file structure for an ExpressJS app.

500 error when I try to deploy nextjs ssg application with incremental-static-generation

I have NextJS app with SSG. This functionality was added recently and according to it I should do next-export after next-build to get static files. But after appearing in 9.4 of Incremental Static Regeneration I need to keep server on by npm-start command (in my case I use custom server file with next-express functionality). It works good locally and It works good when I get artifact from Azure. But It doesn't work globally when it will be deployed finally. Help please
Through my attempts, I found that it is impossible to install globally or use next in Azure Web App. That is, it cannot be deployed through Github.Deploying using other methods such as FTP cannot run successfully. It should be related to the azure node environment.
But the method provided in this post says that it can be processed by adding web.config. I think it should be useful and helpful to you. Please read it carefully and try it.
You also can read this document, maybe it useful to you.

Custom Plugin for hawtio 2.x

I am trying to write a custom plugin for hawtio 2.x.
The first step that I tried building the entire project (https://github.com/hawtio/hawtio) as instructed in https://github.com/hawtio/hawtio/blob/master/BUILDING.md
Later, I tried the example (springboot sample) located at https://github.com/hawtio/hawtio/tree/master/examples/springboot
The example seems to run fine, except for the fact that I do not see a trace of the sample plugin written in this application (https://github.com/hawtio/hawtio/blob/master/examples/springboot/src/main/webapp/app/sample-plugin/js/sample-plugin.js)
Right now, I am not trying to do fancy stuffs. I am simply trying to run this sample application and see how the plugin works.
Below is the screenshot of the web console. I have also checked in the browser console. I do not see any traces of the initialization of this plugin.
Am I missing something specific?

Setting Backbon.Marionette using RequireJS with CDN

I'm trying to set a Backbone project with Marionette extension using requireJS.
I couldn't make it work when using one of the CDNs like cdnjs.
Does anyone know of a good example mixing these three?
I created an example of using Backbone.Marionette with Require, you can find it here :
http://beta.plnkr.co/edit/bPMwEqPz1sYod46Stfhk
You just need to click run to confirm that Mariontte is working from a CDN.
in this example you have the html open by default, but in the menu you will find the script.js that im using to load everything with require.
hope this heps.

Resources