Is there a way we can export the workflows created in Netsuite? - netsuite

I have created a workflow and I want to migrate it another account.
Can it be exported in some file format?
I tried finding the options but got any.

You've 2 options through the SuiteCloud Development Framework or SuiteBundler.
For SuiteBundler just follow this guide.
For account customization with SDF - SuiteCloud Development Framework
make sure you've Node.js installed.
create a new npm project: npm init
install the SuiteCloud CLI tools: npm install #oracle/suitecloud-cli --save-dev
update your package.json including the following script commands.
{
...
"scripts": {
"setup": "suitecloud account:setup -i",
"import": "suitecloud object:import -i",
"deploy": "suitecloud project:deploy"
},
"devDependencies": {
"#oracle/suitecloud-cli": "^1.6.2"
}
}
setup your account: npm run setup
import your workflow objects (xml files): npm run import
create a second project, setup similar to above but for the other account, copy over the
xml files, and deploy them to the new environment: npm run deploy

Related

Azure Windows WebApp error - ESLint must be installed in order to run during builds: npm install --save-dev eslint

I'm currently trying to deploy a windows web app in Azure. I am using Nodejs, and specifically it's a next.js react app w/ typescript. I am running into errors in the deployment to azure.
I'm using github actions pipeline to build and deploy the application and when run there, npm install and npm build work without issue. The problem is when I have the SCM_DO_BUILD_DURING_DEPLOYMENT app setting set to true then I receive a lint error on the Deploy to Azure step since it is rebuilding the application on the web app. The error is:
error - ESLint must be installed in order to run during builds: npm install --save-dev eslint
I have SCM_DO_BUILD_DURING_DEPLOYMENT set to true because I had read earlier that node has issues with Azure webapps linking node packages, so you need to run the build on the server.
The issue is that when I run the build during the deployment, I read that the command npm install --production gets run. When this runs, it installs my packages properly, but then when it does the postinstall build step, it fails with the above eslint error.
When I have SCM_DO_BUILD_DURING_DEPLOYMENT set to false then the deployment succeeds in my pipeline, but the application doesn't work.
In the windows app I am not able to see the error logs, but previously when I had been deploying this as a Linux app, it showed missing packages due to the node_modules linking issue, so I am thinking it's the same issue on windows. (To view application logs I went to Diagnose and Solve Problems -> Application Logs and on windows I don't get the same options, everything I click just shows me graphs so I'm not sure how to verify it's the same issue but it seems to be.
TLDR
How do I fix the eslint error and successfully deploy my next.js application? Here is my package.json:
package.json
"scripts": {
"dev": "node server.js",
"build": "next build",
"start": "node server.js",
"lint": "next lint",
"postinstall": "next build"
},
Am I just going about deploying a next.js application the wrong way on azure web app? Any guidance is appreciated. I've spent a few days trying to get this working at this point. Should I be creating a custom deploy script? I wasn't able to find documentation for doing that with node, but I see in the error output that the webapp runs
azure site deploymentscript -y --no-dot-deployment -r "C:\local\Temp\zipdeploy\extracted" -o "C:\home\site\deployments\tools" --node --sitePath "C:\local\Temp\zipdeploy\extracted"'. so is there a way to alter that?
There is a work around to this error and that will be to ignore the eslint completely.
This can be achieved by configuring the next.config.js by adding the ignoreDuringBuilds option under the eslinttag.
The next.config.js should look like this:
/** #type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
eslint:{
ignoreDuringBuilds : true,
},
}
module.exports = nextConfig
Here I have deployed Boilerplate nextjs code with the above next.config.js file.

Cannot deploy firebase cloud functions, because functions/lib/index.js does not exist

I think there is a bug in firebase cloud functions setup.
I did:
npm install -g firebase-tools
firebase init functions
I have configured it for typescript, everything installed, yet I cannot deploy the functions because I am getting this error message:
Error: There was an error reading functions/package.json:
functions/lib/index.js does not exist, can't deploy Cloud Functions
I know that it does not exist - there is no lib folder at all, but what can I do to run the functions?
Why I can't run functions, if I done everything that needed to be done?
I understand you might be following the instructions from the Getting started guide or the Use Typescript for Cloud Functions one, during this section the wizard helps you choose Typescript as your language to write Functions. Please be sure the language and its dependencies are correctly installed. And in this last guide for the Using an existing Typescript project, it asks you to edit the package.json to add a bash script to build your typescript project:
{
"name": "functions",
"scripts": {
"build": "npm run lint && tsc"
}
...
and the firebase.json to add a predeploy hook to run the build script:
{
"functions": {
"predeploy": "npm --prefix functions run build",
}
}
but in this case, you need to check if this configuration was made during the installation.
You can check this answer where the user used sudo npm install typescript to install them, and as Doug mentions try to install it only in your project, not globally; and it must be defined in your package.json as well.
Another example that fixed a similar issue where:
The user removed everything related to Firebase Functions
Entered in the project directory using cd functions (in this case replace the ‘functions’ name for your project)
Ran npm install
Running again firebase init
Let me know if you were able to solve this problem to further assist you, trying to add more information as steps and documentation followed and the logs.
Open a terminal and cd to functions
Then run npx tsc --watch
And try serving and deploying the project

npm install - jest doesn't exist in Azure Pipeline

Apologies in advance that I can't share source for this one:
I've got a client that has to use Azure DevOps Pipelines to build a github enterprise hosted project.
It is a perfectly regular node.js project with jest specified as a devDependency in package.json.
When the npm install runs on an Azure Pipeline, jest doesn't get installed. I created a local x64 linux agent on Ubuntu 18 on my desktop, and it doesn't get installed their either but when I manually run npm install inside the /s/ directory it's all okay.
What is Azure Devops doing to the script that this is the result?
What is Azure Devops doing to the script that this is the result?
Test to run Npm install in Azure Pipeline and local machine, it seems that they have the same behavior. The Jest will be installed in node_modules folder.
Here are my steps, you could refer to it.
The File structure. I also add the jest to devDependency in package.json.
"devDependencies": {
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"enzyme-to-json": "^3.3.3",
"jest": "^22.4.3"
}
Use the Npm install task in Azure Pipeline.
- task: Npm#1
displayName: 'npm install'
inputs:
workingDir: package
verbose: false
Run the pipeline and the Jest will be installed in the node_modules folder.
By the way, I test the same steps on the Microsoft-hosted agents: ubuntu-18.04 and it could work fine.
Updates
For running Npm install with the Script:
Here is an example:
steps:
- script: |
cd $(build.sourcesdirectory)/package
npm install
displayName: 'Command Line Script'
The first step is used to navigate to the source folder(contains package.json file).
Then the jest will be installed.

Google App Engine Standard Node JS how to run build script?

Does GAE standard for Node support a way to have build scripts? I tried using postinstall within package.json but that did not work.
My codebase has subdirectories with package.json within the subdirectories. In my root package.json there is
scripts: {
postinstall: cd vendor && npm install
....
}
However I'm not seeing any vendor packages installed so I'm inclined to believe the postinstall does not get triggered on GAE Node standard.
Is there any way for me to install subdirectory dependencies without having to copy and paste all my vendor/package.json dependencies to the root?
Note: I've also tried putting an "install" within the package.json scripts but that didn't seem to get triggered either.
In GAE standard, installation of dependencies are automatically managed. You should add them in your package.json.
As Google documentation mentioned :
When you deploy your app, the Node.js runtime automatically installs all dependencies declared in your package.json file using the npm install command.
{
"dependencies": {
"lodash": "^4.0.1"
}
}
Installation will be done during app deployment via :
gcloud app deploy
To add a build step, run the following:
gcloud beta app gen-config --custom
This will generate the default dockerfile and config that is run. In your .dockerfile, add your build step:
RUN npm run build --unsafe-perm || \
((if [ -f npm-debug.log ]; then \
cat npm-debug.log; \
fi) && false)
"prestart": "if [ ! -d build ]; then npm run build; fi",
" -d build" here is the build process generated folder, replace it to whatever you actually use.
Not sure if this will work for your case, but seems like GAE standard has added the ability to run a custom build step.
However it does state:
After executing your custom build step, App Engine removes and regenerates the node_modules folder by only installing the production dependencies declared in the dependencies field of your package.json file.
Maybe since the node_modules are in your vendor/ directory, GAE may not detect and remove them, thus accomplishing your goal. This is a pre-install step, unlike postinstall specified in your script. Not sure if it matters.

Create WebStorm run configurations from package.json "scripts" section

In my package.json file, I have the following "scripts" configuration.
...
"scripts": {
"start": "watchify -o lib/index.js -v -d .",
"build": "browserify . | uglifyjs -cm > lib/index.js",
"test": "jest"
}
...
This allows me to run npm start, npm build and npm test from the command line.
This is great! But ideally, I would like to be able to run those tasks from within WebStorm using run configurations, due to how convenient the interface is. I have not been able to figure out how to do this.
Is there a way to create my own custom run configurations or automatically generate them from my package.json?
you can use Node.js Run configuration for this. For example, for 'npm start':
Working dir: /path/to/your/package.json
JavaScript file: /path/to/global/node_modules/npm/bin/npm-cli.js
Application parameters: run start
To find the global node_modules path from the command line use "npm root -g".
There is no way to auto-create run configurations from files. And the only way to create your own run configuration is developing a plugin - see http://confluence.jetbrains.com/display/IDEADEV/Run+Configurations
Update: since 2016.x, WebStorm provides a special run configuration - npm - for running/debugging NPM scripts. It can be created manually via Edit configurations... dialog, or auto-added by selecting the script in NPM tool window (can be opened from package.json right-click menu).
See https://www.jetbrains.com/help/webstorm/2017.3/running-npm-scripts.html
WebStorm and IntelliJ 2016 included support for NPM scripts as part of the NodeJS plugin.
Scripts are launched in four ways:
From a tree of scripts in the dedicated NPM Tool Window. The tool window opens when you invoke npm by choosing Show npm Scripts on the context menu of a package.json in the Project tool window or of a package.json opened in the editor.
According to a dedicated run configuration, see Run/Debug Configuration: NPM.
Automatically, as a start-up task.
As a before-launch task, from another run configuration.
For more details check out their documentation.

Resources