react js npm googleapis,#googleapi/sheets package error for version (npm=9.2.0,node=v18.13.0) - npm

React message error image links
My local PC is running Ubuntu 22.04.1 LTS.
When installing the package, there are no problems; there are a few warnings and a red error, but rendering works fine. But when I installed the Google package "npm install googleapis" or "npm install #googleapis/sheets" and imported the function, errors occurred. I commented on the import package line, and there is no error. to make sure, I uncommented the line again but errors(long 50 errors package) happen
--more detail about my pc [optional]--
I use Ubuntu, and when I install "sudo apt install npm," it downloads a far-old version "12.x.x." Then I remove it with apt autoremove and download the node file from the website, version 18.13.0. At the time, I'm not sure how to install the file, so I extract the node file, rename it to node, move it to /opt, and export it to $PATH:.../opt/node/bin. (if you don't mind please tell me how to install node properly)
I'm not sure what the cause of the error is.
Thank you for helping
Simon
Expect to understand the error to fix the core problem if there is a bad PC system configuration.

Related

Watchman Version Showing 0.0.0. Preventing npm start on React Native App

I am trying to develop a react native application on MacOS, but I have been running into issues with installing watchman onto the machine. I have been running the command brew install watchman and whenever I enter the command watchman version the output displays version: 0.0.0. However, directly after running the first installation command over again, I see Warning: watchman 2022.06.06.00 is already installed and up-to-date which is really confusing me.
I have tried various different troubleshooting techniques such as uninstalling and reinstalling watchman, instead of using brew I attempted using sudo port install watchman with MacPorts, removing the .watchmanconfig file and re-creating it, and lastly restarting my device, but none of these solutions have seemed to work for me.
Whenever, I open my react native project and run the command npm start, this is the output that I see,
jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
...
watchmanResponse: {
error: 'std::__1::system_error: open: /Users/USER/Desktop/ReactNativeApp: Operation not permitted',
version: '0.0.0'
}
This error message ends the npm start and because of this, I am unable to run npm run ios and continue with the development of the application. If anyone happens to know of any fixes or has experienced this before I would appreciate it if you share how I can resolve it. Thank you.
We can resolved this when we put our project outside from those folder Desktop,Download and Document
then run
npm start
It will be work
thanks

Cannot find module ‘#expo/metro-config’ when trying to start the project with expo cli >= 4.8.0

I recently tried to launch my project on a new computer. I downloaded the source code from its repository and ran npm install to get all the needed packages.
However, when I run npm start or expo start:web, I get the error:
Cannot find module '#expo/metro-config'
I ran npm install #expo/metro-config and the install run without issue, but I still get the “Cannot find module '#expo/metro-config'” error.
The only post I saw regarding this error recommends editing the metro.config.js but I do not use one.
I am on SDK 42, and the project launches fine on my other computer. Any idea what is happening?
FYI, I use to perform this whole operation without any issue until now.
UPDATE:
I ran npm install -g #expo/metro-config and now I get the error Cannot find module 'resolve-from'
So it looks like maybe running npm install -g expo-cli doesn't actually install all the necessary packages? Could it be the issue?
I managed to make it "work" (get other missing packages errors down the line) by reverting to expo-cli 4.7.3. Anything from 4.8.0 and above will cause the error.
Something else is that on a fresh npm install, after running npm install -g expo-cli, if I try to create a project with expo init, I will get the error Error: Cannot find module 'kleur'. Running npm install kleur fix it, but maybe that's also a clue.

Why is preact not getting recognized in the terminal even after installing it?

I have installed Preact but it’s not getting recognized in the terminal. First, I went to the official website of PreactJS. The doc says that I have to run npm install -g preact-cli. As I am using Yarn, I ran yarn global add preact-cli. It was installed successfully but with a lot of warnings. Then I ran preact create default first-preact-app. But it's showing an error that "The term 'Preact' is not recognized as a name of a cmdlet, function, script file or executable program."
I have tried force cleaning the cache and reinstalling preact-cli. But it doesn't work. Two of the warnings are that preact and preact-render-to-string have unmet peer dependency. So, I have installed them also. But it still doesn't work.
I have tried running npm and experimented with the commands also. But it didn't work. So, how can I fix the problem?
I have run these commands using Powershell and Git bash on Windows 10. I am trying to install Preact 10.5.12 using Yarn 1.22.5. And a point to be noted, I tried running yarn dlx but it returns an error that "command not found". And when the installation of preact and preact-render-to-string gets finished, yarn gives and warning that they have no binaries.
EDIT: Perhaps, it was a problem with Windows. The problem has gone after reinstalling it.
Your problem almost certainly is that preact-cli was not on your PATH - a list of programs that are globally accessible.
For what it's worth, we don't recommend installing globally. The site may still say that but the repository correctly recommends using npx instead.

expo always returning me with "-bash: expo: command not found" everytime i go to set up a project, "expo init projectname". how do i resolve this?

have downloaded latest version of node.js on mac
terminal says ive downloaded latest version of expo cli
if i try to run my first project in terminal; expo init project name, am always met with the same error. -bash: expo: command not found.
when i check terminal to make sure that expo is installed, i am also met with: -bash: expo: command not found.
i have spent at least 3 days trying to resolve this problem.
any help towards this resolution would be greatly appreciated
How have you downloaded the Expo CLI? It may be important to note that if you don't install the package globally, like npm install -g expo-cli, it may not be properly executable.
[Additionally, One thing I've found when installing commands is that it can help to restart your terminal. Sometimes after you've installed something new, not everything will be in place, but it might be there when the terminal restarts.]

Missing package name Error with vue cli install from tar

I am behind a corporate proxy and so am installing npm packages via the downloaded tar files. It's worked just fine for alot of packages, however, I have come across the following error when attempting to install the Vue CLI:
Can't install ... Missing package name
I have not found much reference to this error elsewhere. Wondering if someone can point me in a direction on this.