How to update Node version in Codespace [duplicate] - node.js

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.

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

Compatibility issues Node and Strapi4

allow me to walk you through some problems I'm encountering when setting up Gatsby with Strapi. Hopefully, somebody can provide me with a solution. Whenever I use the following command yarn create strapi-starter strapi-test gatsby-blog I get the following error:
So what I do next is switching to node v15 using nvm to make strapi compatible with node. The result being that some packages are being installed followed by yet another compatibility error:
Therefore, I am wondering what I am doing wrong and how to make strapi4 compatible with node without having the errors above?
Use Node.js v16 rather than v15. It should fix the issue.
Besides, it's better to use even-numbered version of Node.js, as they're LTS.

Fork node_module react and install not working

I tried to fork this react native module to make some corrections, because the author abandoned the project and he was the only tool I found and meets my need, so reading an article I found out about the fork, I did this procedure, then I cloned and did necessary correction, only when having to add the module to my react project with the
yarn add lucassouza16/react-native-svg-uri
I get this error:
error Couldn't find the binary git
I'm new to this forking function, is there anything else I need to do?
My bifurcated repository:
https://github.com/lucassouza16/react-native-svg-uri
Original repository:
https://github.com/vault-development/react-native-svg-uri
To add it via npm or yarn you will need to add this firstly to npm registry. Here you have more information about it https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry
You can also add via github doing like this:
yarn add git+https://github.com/lucassouza16/react-native-svg-uri.git
You can read more about it here:
How to install an npm package from GitHub directly?
In the end all responses resulted in the same error, yet thanks to everyone who tried to help me, but it worked when I added the release version, this is the correct format:
yarn add lucassouza16/react-native-svg-uri#1.2 .4

Yarn unable to add packages (both inside and outside workspaces)

Yarn unable to add packages (both inside and outside workspaces)
Hi there, I'm using Yarn 2, I don't seem to be able to install any package. I always get the following formatted error:
$ yarn add useful-package
➤ BR0027: useful-package#unknown can't be resolved to a satisfying range
➤ Errors happened when preparing the environment required to run this command.
I have tried both inside a project that uses yarn's workspaces and outside in another test project.
This occurs with any package I try and Googling around I can't seem to find any relevant hits yet for this error message here.
What do you reckon the issue may be?
Best,
Matt
Turns out I'd hit a Node JS version conflict with Yarn 2.
Make sure to use latest Yarn (berry/2) with a node version V10.19.0 or greater.
I hope this helps someone!
Best,
Matt

Noflo example : Running inside browser

We are trying to get a simple noflo example running inside a browser as described the noflojs.org/documentation/fbp/ [Language for Flow-Based Programming]
We tried to refer to some examples available on GitHub
github.com/noflo/noflo-browser-app
github.com/noflo/noflo-websocket
github.com/bergie/flowcopter
We tried npm install; grunt build. We get the below error and are not able to proceed beyond this:
Running "noflo_browser:build" (noflo_browser) task install
noflo/noflo#master Warning: dns lookup failed Use --force to
continue.
Any idea what are we missing ?
At the time of the question the build setup for the projects mentioned was still based on Component.js which had become unmaintained.
Nowadays we're using NPM for installing dependencies and WebPack for browser builds.
Suggested fix would be to fetch the latest versions of these repos, do npm install and build again. This will bring the build up to spec.
If you're using the old build setup in your own projects, this PR is a handy example on what to change to go from Component.js to WebPack.

Resources