nw-builder - NWJS win64 app built using nw-builder does not run my code, only shows default NWJS splash screen - nwjs

I am attempting to build my first NWJS app for win64. I'm using MacOS 10.13.6 . After a rough start and updating npm and node, I finally ran a build which completed without errors. I downloaded the app package to my Windows machine, however when I run the .exe file, the app opens displaying the NWJS splash screen, instead of loading my code. Any ideas?
Root directory I'm running in:
10:50:50 : ~/ReolinkNWJS
ls
dist icons javascript package-lock.json package.json.TEMPLATE src
html images node_modules package.json resources styles
Do the build:
10:51:01 : ~/ReolinkNWJS
npm run prod
> ReolinkNWJS#0.0.1 prod
> nwbuild --platforms win64 --buildDir dist/ ./
Latest Version: v0.65.0
Using v0.65.0 (sdk)
Create cache folder in /Users/kevin/ReolinkNWJS/node_modules/nw-builder/cache/0.65.0-sdk
Using cache for: win64
Create release folder in /Users/kevin/ReolinkNWJS/dist/ReolinkNWJS/win64
Resulting win32 directory:
12:47:48 : ~/ReolinkNWJS
ls dist/ReolinkNWJS/win32
ReolinkNWJS.exe d3dcompiler_47.dll icudtl.dat locales notification_helper.exe nw_200_percent.pak payload.exe swiftshader vk_swiftshader_icd.json
chromedriver.exe debug.log libEGL.dll nacl_irt_x86_64.nexe nw.dll nw_elf.dll pnacl v8_context_snapshot.bin vulkan-1.dll
credits.html ffmpeg.dll libGLESv2.dll node.dll nw_100_percent.pak nwjc.exe resources.pak vk_swiftshader.dll
I downloaded the complete win64 directory to my Windows machine, then executed the containing ReolinkNWJS.exe file. As I stated, I only got the NWJS default splash screen, not my app.
package.json:
{
"name": "ReolinkNWJS",
"description": "Reolink Client App In NWJS Framework",
"version": "0.0.1",
"icon": "icons/app.icns",
"main": "html/main.html",
"chromium-args": "--enable-logging=stderr --enable-spell-checking",
"window": {
"toolbar": false,
"width": 800,
"height": 500,
"position": "center"
},
"nodejs": true,
"scripts": {
"prod": "nwbuild --platforms win64 --buildDir dist/ ./"
},
"devDependencies": {
"nw": "^0.12.0",
"nw-builder": "^3.7.0"
}
}

for nwbuild part:
nwbuild --platforms win64 --buildDir dist/ ./
add in the flavour below may solve the issue:
--mode build

This might be related to the issue you're encountering, since you're both using WINE: https://github.com/nwutils/nw-builder/pull/572#issuecomment-1144416689

Related

Setup launch.json file for Flutter web using local Flutter version

I have installed Flutter in my mac inside my root folder: /[root]/flutter and I use it on project A.
Now I need to use a different version of Flutter for project B (flutter web), so I cloned Flutter inside project B's root directory.
I know that to run it, I have to launch ./flutter/bin/flutter run but how can I setup launch.json for VScode?
Here is my launch.json file:
{
"version": "0.2.0",
"configurations": [
{
"name": "Web",
"type": "dart",
"request": "launch",
"deviceId": "chrome",
"args": [
??
]
},
]
}
I think that if I use it, then it will use the standard Flutter in my mac root and not the Flutter inside the project folder.
How can I edit the launch in a way that if I click on the play button in VScode then it will run ./flutter/bin/flutter run?
I'm not interested to use tools like FVM
Open command palette, enter Preferences: Open User Settings.
Search Flutter Sdk Paths. Add additional flutter sdk from there.
Open flutter project. Do Flutter: Change SDK in the command palette.

nextjs page not found after deployment

I created a simple nextjs app using create-next-app
I added only some pages in pages folder (contact.js, help.js)
I can build and start app in localhost using below commands
npm run build
npm run start
this is script part of package.json
"scripts": {
"dev": "node server.js",
"build": "cross-env next build",
"start": "cross-env NODE_ENV=production node server.js",
"lint": "next lint"
},
I deployed this app on a shared host with plesk control panel
index page is ok,
but it not found help and contact pages
neither by typing url directly in address bar, nor clicking in Link (next/link)
.next folder content:
.next/server folder content:
.next/server/pages folder content:
at first I set Application Startup File to
node_modules/.bin/next
and tried run start script but it didn't work, so to start app
I set Application Startup File to: customserver.js in plesk like below:
Custom Server
what can be wrong here?
any ideas?

npm run build error in nextJS and vercel deploy

I have an app already deploy on vercel , i change just a a content in a page and push it on git without problem(i make that many times without problem before), but now i can't execute npm run build return an error , the same error on vercel deploy.
Can any one help me to fix this issue.
00:50:06.011 > next .next/build
00:50:06.209 > No such directory exists as the project root: /vercel/workpath0/portfolio/.next/build
the script in package.json
"scripts": {
"dev": "next dev",
"build": "next .next/build",
"start": "next start"
},
vercel deploy terminal
The reason its failing with "No such directory exists" is because the .next directory doesn't exist until you run next build, which is the command that generates the output.
Change your build script to next build, like it shows in the Next.js docs, and it will work.

Build error on Ionic Pro build process

I am batting to get a successful build on IonicJs when I push my code up to the Ionic Git remote.
My application sits in a subfolder on the root directory of my repository. At first when I execute “npm run build” on the root the build process was telling me it could not find my package.json file. After reading the ionic docs (https://ionicframework.com/docs/pro/basics/concepts/customizing-builds.html) I noticed that in the case of an app being in a sub folder you need to place another package.json file in the root of your repository. I did this and the above error was solved and the build process worked on my local machine. But when I push the changes up to the Ionic Js for building it tells me that its “Missing ionic.config.json in app.”
Here is the package.json file I placed in the root of my repository.
{
"author": "",
"name": "io.cordova.myappe070fb",
"private": true,
"version": "0.1.0",
"scripts": {
"install": "cd App && npm install",
"build": "cd App && .\\node_modules\\.bin\\ionic-app-scripts build --prod"
}
}
`
My questions:
Is there a way to configure the package.json file in the root of the repository so that when Ionic runs “npm run build” it will build based on the package.json file in the App folder.
How do I solve the problem regarding the missing ionic.config.json error that is being generated by ionic.
Kind regards
Andrew

How to configure bower in Asp.net project using Visual Studio Code

I create an empty project using Visual Studio Code's terminal. Then I add bower.json and bower_config.bowerrc files then using terminal run the bower update command. The files contains next code:
bower.json
{
"name": "asp.net",
"private": true,
"directory": "wwwroot/lib",
"dependencies": {
"bootstrap": "4.0.0-alpha.6"
}
}
bower_config.bowerrc
{
"directory": "wwwroot/lib"
}
But even I configured it to download files into wwwrooot/lib folder it still install into bower_comoponents folder. How can I resolve that?
P.S. I need to use Visual Studio Code not Visual Studio.
Your bower configuration file should be named .bowerrc (no bower_config prefix).