How to tell gulp which version of node-webkit to use - node.js

I'm building a node webkit app and want to gulp run it. However every time gulp grabs the 'latest' alpha build (v0.13.0) and I need it to grab v0.12.2 how can I tell it to do this??
The full error is:
[11:14:45] Starting 'run'... Latest Version: v0.13.0 Using v0.13.0 Create cache folder in
/Users/Scot/chat/node_modules/node-webkit-builder/cache/0.13.0
Downloading: http://dl.nwjs.io/v0.13.0/nwjs-v0.13.0-osx-x64.zip
ERROR: The version 0.13.0 does not have a corresponding build posted
at http://dl.node-webkit.org/. Please choose a version from that list.
Unable to download nodewebkit. [11:14:47] Finished 'run' after 1.75 s

You can see here: https://github.com/mllrsohn/node-webkit-builder/blob/master/example/Gulpfile.js
var nw = new NwBuilder({
version: '0.12.2',
files: './nwapp/**',
macIcns: './icons/icon.icns',
macPlist: {mac_bundle_id: 'myPkg'},
platforms: ['win32', 'win64', 'osx32', 'osx64']
});

Related

NestJS - loops endlessly when starting in watch mode

This is a very simple question and yet I could not find answers anywhere, hopefully here:
I'm trying to run the default NestJS project by using:
npm run start:dev
The command I used to create the project is:
nest new project-name
The result is:
[18:43:12] File change detected. Starting incremental compilation...
[18:43:18] Found 0 errors. Watching for file changes.
In a loop over and over endlessly...
It's important to say I didn't change ANYTHING in the default project and this was replicated on multiple computers with Windows 10 and Windows 11.
The NodeJS version I'm using is 18.13.0 and the NestJS version I'm using is 9.2.1.
What is your npm version?
Try to downgrade to version 6.x.x

How to update Node version in Codespace [duplicate]

I am starting to develop VS Code and following the guide has let me to the point I'm not able to continue with Codespaces without upgrading node.js version.
I was at https://github.com/microsoft/vscode/wiki/How-to-Contribute#build so I'm trying to run yarn and I get this.
#p4nu ➜ /workspaces/vscode $ yarn
yarn install v1.22.19
$ node build/npm/preinstall.js
*** Please use node.js versions >=16.14.x and <17.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#p4nu ➜ /workspaces/vscode $ node -v
v14.19.3
I have searched here for any available answers using tags [visual-studio-code], [codespaces] and [node.js] but I found none.
After looking for answers I stumbled upon this documentation step.
I tried adding a new configuration file but I noticed (not for my surprise) this was already made in this project. It fetches the dev-container image which is referencing the node.js version 14.
It would be possible to update node.js version inside the devcontainer.json file, but for this repo I think it's out of the question. I'll just set up things locally in my case.
Edit: I have updated the nodejs in another repo here which allows the newer node.js to be used in Codespaces.

Node.js native addon module (tfjs_binding.node) can not be found

I am writing an Electron application and would like to integrate my AI. For this I have installed #tensorflow/tfjs-node version 3.0.0. When I want to execute my code (const tf = require("#tensorflow/tfjs-node");) the following error message appears in the console:
Uncaught (in promise) Error: The Node.js native addon module (tfjs_binding.node) can not be found at path: C:\...\simplePhishNew\node_modules\#tensorflow\tfjs-node\lib\napi-v6\tfjs_binding.node.
Please run command 'npm rebuild #tensorflow/tfjs-node build-addon-from-source' to rebuild the native addon module.
The Console is tell me:
node-pre-gyp info This Node instance does not support builds for N-API version 7
The Solution,
Please run command 'npm rebuild #tensorflow/tfjs-node build-addon-from-source' to rebuild the native addon module.
doesnt work and is showing the following error message.
CPU-windows-3.0.0.zip
* Building TensorFlow Node.js bindings
symlink ./lib/napi-v7 failed: null
#tensorflow/tfjs-node#3.0.0 C:\...\node_modules\#tensorflow\tfjs-node
Thanks for the effort
I did it guys...
Step 1:
Stop crying
Step 2:
Call the boss again and take back the notice of termination
Step 3:
Electron need a specific node version
https://github.com/electron/releases
For example Electron v. 11.3.0 needs node 12.18.3
Step 4:
Ask yourself why you actually got the job

Node error when I run npm with laravel breeze

I have this error when I run npm run dev or npm run watch and I didn't find what is the mess. It's happens in a all fresh Laravel 8 app.
It looks like happen when I use the developement command
ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
TypeError: [(...variantsValue),(...extensions)].flat is not a function
at /var/www/html/smart_recipe/node_modules/tailwindcss/lib/util/resolveConfig.js:219:73
at baseMergeDeep (/var/www/html/smart_recipe/node_modules/lodash/_baseMergeDeep.js:42:7)
at /var/www/html/smart_recipe/node_modules/lodash/_baseMerge.js:27:7
at /var/www/html/smart_recipe/node_modules/lodash/_createBaseFor.js:17:11
at baseMerge (/var/www/html/smart_recipe/node_modules/lodash/_baseMerge.js:24:3)
at /var/www/html/smart_recipe/node_modules/lodash/mergeWith.js:36:3
at /var/www/html/smart_recipe/node_modules/lodash/_createAssigner.js:30:9
at apply (/var/www/html/smart_recipe/node_modules/lodash/_apply.js:15:25)
at /var/www/html/smart_recipe/node_modules/lodash/_overRest.js:32:12
at mergeVariantExtensions (/var/www/html/smart_recipe/node_modules/tailwindcss/lib/util/resolveConfig.js:218:33)
at resolveVariants (/var/www/html/smart_recipe/node_modules/tailwindcss/lib/util/resolveConfig.js:235:10)
at resolveConfig (/var/www/html/smart_recipe/node_modules/tailwindcss/lib/util/resolveConfig.js:271:15)
at /var/www/html/smart_recipe/node_modules/tailwindcss/lib/index.js:77:37
at /var/www/html/smart_recipe/node_modules/tailwindcss/lib/processTailwindFeatures.js:52:20
at LazyResult.run (/var/www/html/smart_recipe/node_modules/postcss/lib/lazy-result.js:288:14)
at LazyResult.asyncTick (/var/www/html/smart_recipe/node_modules/postcss/lib/lazy-result.js:212:26)
at LazyResult.asyncTick (/var/www/html/smart_recipe/node_modules/postcss/lib/lazy-result.js:225:14)
at /var/www/html/smart_recipe/node_modules/postcss/lib/lazy-result.js:217:17
at runLoaders (/var/www/html/smart_recipe/node_modules/webpack/lib/NormalModule.js:316:20)
at /var/www/html/smart_recipe/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /var/www/html/smart_recipe/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/var/www/html/smart_recipe/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Promise.resolve.then.then.catch (/var/www/html/smart_recipe/node_modules/postcss-loader/src/index.js:208:9)
# ./resources/css/app.css
I came across same issue and spent 5 hours on finding solution but could not.
After searching alot, I came across this
"Tailwind CSS v2.0 no longer supports Node.js 8 or 10. To build your CSS you'll need to ensure you are running Node.js 12.13.0 or higher in both your local and CI environments."
at https://tailwindcss.com/docs/upgrading-to-v2
So I realized that issue was in my Node version which was 10.x so
I uninstalled Node from my windows machine and downloaded LTS version (14.x).
So consider updating your Node version, it will solve the issue as it did work for me.
There is possibility that old node versions don't have that flat function that Tailwind CSS 2 has implemented and that's throwing error.
I Had the exact same issue after installing Breeze... Unfortunately the npm error message gives no clue of what is really going on !
Thanks to #DaniyalGondal I found out that my node version was raising the error because of tailwind V2 requirements (https://tailwindcss.com/docs/upgrading-to-v2) that comes with Breeze... So I did upgrade my node version using : sudo n latest under ubuntu20
Don't forget to restart your terminal after upgrading and check that your node is correctly upgraded using : node --version
If the node version is above 12.13.0, now npm run watch or npm run dev should work fine !

Unable to install nodejs on my computer

I am using windows and when I took reference to download node js from here. When I write this line
C:> cinst nodejs.install -Version 0.6.10
in CMD it gives an error
C:>cinst nodejs.install -Version 0.6.10
'cinst' is not recognized as an internal or external command,
operable program or batch file.
I don't know how to install node js.I also have a question that if I install node js version say v0.10.26 will the programs made with previous versions(say 0.9) will work on 0.10
That error means that your cmd session can't find cinst. To use cinst, you have to install the package manager from http://chocolatey.org/
If you just want to get Node.js running though, there's a Windows installer at http://nodejs.org/download/ or you can just hit the big green Install button at http://nodejs.org/
Summarizing comments:
All of the versions are maintained and available under http://nodejs.org/dist/, 0.6.10 can be found at: http://nodejs.org/dist/v0.6.10/ and you can get the Windows installer by downloading the .msi file.
As for whether there might be breaking changes from version to version, most code moves forward just fine, but testing is always a good idea. Some packages will specify a specific version in their package.json file, but most will just request a version greater than a certain point in the engines element like:
{ "engines" : { "node" : ">=0.6.10" } }

Resources