Facing issue while installing tensorflow.js via npm - node.js

Used the following cmd (as given in the tensorflow docs) : npm install -g #tensorflow/tfjs-node
Tried to figure out the issue, but unable to find a solution. Kindly help in resolving this. (Thanks in Advance)
The image below shows the error I am getting.

You need to either install node-gyp (https://github.com/nodejs/node-gyp#installation) or ensure that the right version of python is accessible to it.
If you've already got node-gyp and python 2.7 installed, run npm config set python python2.7 to configure npm to use it.

Related

How can I install parcel package using npm install --save-dev parcel?

I am trying to install parcel webpack but there are some warnings in this installation. I also checked by deleting node_moduels folder but every time getting the same warning.
Screenshot 1
Screenshot 2
The command you are attempting to run uses Python 2 syntax. It is incompatible with Python 3 and when you want to install the package, node-gyp is executed with python3 and this error happened.
This question explain how to change the python version for install package

Strapi V4 Error: Can't resolve '#strapi/design-system/themes'

I'm trying to run the new Strapi version 4 application. But it returns this error.
Is there any bug in new strapi v4? or I'm doing wrong anything?
I'm using strapi official guide to start a new project
installation command npx create-strapi-app#latest molla-admin.
NodeJS v16
Windows 11
Error
ModuleNotFoundError: Module not found: Error: Can't resolve '#strapi/design-system/themes' in 'C:\Users\Admin\Desktop\molla-admin\.cache\admin\src'
at C:\Users\Admin\Desktop\molla-<anonymous>:10:1)
You might be thinking #strapi/design-system package is missing right? After that, I also tried to install both #strapi/design-system and #strapi/design-system/themes npm package
Still, it doesn't work. It returns a new error
ModuleNotFoundError: Module not found: Error: Can't resolve '#strapi/icons/CarretDown' in 'C:\Users\Admin\Documents\testing\strapi-v4-app\node_modules\#strapi\helper-plugin\build'
Should I go on for the next missing Module?
For me the issue was solved by installing #strapi/design-system (Node: v14.15.5, npm: 8.1.3)
npm install #strapi/design-system
Node version : 14.18.1
Npm version : 6.14.15
OS : Ubuntu 20.04.3 LTS
Steps I followed:
(I read somewhere that the latest version of node isnt working and
someone mentioned using the 14.18.1 version)
Downgraded NPM to use the 14.18.1 version and not the latest.
npm run build on the strapi project. This gave an error that its
missing #strapi/design-system.
npm install #strapi/design-system, you get another error that its missing #strapi/icons
npm install #strapi/icons . After this step there was an error relating to JSX scritps something to do with reactjs. So, in the next step , I updated Reactjs
npm install --save react#latest
npm run build again and this time SUCCESS!!
The strapi team should mention the issues on their homepage rather that making new users go through hoops to get it working. They need to make it clear that you can run into issues when using certain version of Node etc. As someone mentioned that they are aware of the issue yet no information in the homepage where new users visit to try it out. It should've been placed as a BANNER at the top in BOLD TEXT.
It's a known bug and they are working on a fix.
You have to use yarn in the mean time.
I can confirm that this bug is related to using Node v16. To get around the bug, I first ran:
nvm use 14.18.1
Afterwards, running the following resulted in successful compilation:
npm run build -- --clean
No need to attempt installation of #strapi/design-system.
I got this error because I was using Node v16. There was a message somewhere in my troubleshooting that you have to use A Node version >=10.X.X.X and <=14.X.X.X
I used NVM(Node Version Manager) to switch to 14.17.6 and it works
following solution worked for me:
yarn add #strapi/design-system
yarn add #strapi/icons
work on windows and ubuntu
node v14.15.0
yarn 1.22.17
npm 6.14.8
npm install #strapi/design-system
solution worked for me.
node 16.13.1
npm 8.1.4
macOS 12.0.1 on M1Max

I can't install npm not matter what I do

So I'm trying to get myself a good Discord Selfbot and one of them requires nodejs, then it said to do npm install. But it gave me an error. I tried again again again and again but nothing worked. The latest thing I did was installing nodejs via scoop but I get this error trying to install npm. Is there a way to do this manually or something? I've tried installing different versions but nothing. I believe scoop installed the latest version.
Here's the image. (the red squares cover up just names)
You have npm already installed, seems that the problem is you don't have a package.json in that location. It says ENOENT: No such file or directory
You already have npm installed! npm is a package manager for installing nodejs packages. Try running some nonsense command (like "lkajshdflhsf") and you'll see what it looks like if you actually didn't have npm installed. What npm install does is install some package. So, for example, if you want to install a node package called Blah, you would run npm intall blah.

Installation of a scoped package resolve in an E404

So I came across this problem when I am trying to install the request-promise module via npm.
It depends on a scoped package named #request/promise-core, and when I try to launch npm install request-promise from my project directory it returns me an error 404. This apparently it is a known issue, see: https://github.com/request/request-promise/issues/137, but none of the solutions works for me, probably due to a wrong implementation on my side.
What I tried so far:
configured npm config set "#request:registry" https://registry.npmjs.org/, but did not worked. Still returning E404
tried to manually install the package via github with npm install https://github.com/request/request-promise but no joy since it returns error: ENOEN when trying to open the request-promise-unpack/package.json file.
Probably I am missing some basic steps when trying to install the module, but I cannot figure out a different way of installing that module.
Any suggestions or alternatives is very appreciated.
I fixed with
npm install -g npm
in the terminal and then I could install it:
npm install --save request-promise

npm err! registry error parsing JSON tried many solution but still getting issue

I'm following This blog and trying to install yeoman using:
npm install -g yo
but getting following error:
npm ERR! registry error parsing json
I have tried every solution that I found on internet but nothing worked for me.
My system configuration is:
OS : Windows-7 64 bit
Node version : 0.11.16
npm version : 2.3.0
I tried npm cache clean, uninstalled and reinstalled nodejs and tried with diff version of nodejs, cleaned temp folder and even restarted my system.
Please provide some feasible solution for this
What could be the reason behind it?
Is it related to some unstable node and npm version? If yes then which version is the most stable so far?
Found the solution:
Installed node version 0.10.36 and it solved my purpose

Resources