error installing latex-sketch-plugin while executing npm run watch - node.js

I am having error installing latex-sketch-plugin. I don't have a complete idea how to install this plugin but I need it for my thesis as I have to make some diagrams that will need mathematical equations written as well. So basically, I have node package manager
amar#admin:~$ npm -v
5.4.2
and I cloned the latex-sketch-plugin repo using git clone into sketch plugin folder i.e ~/Library/Application Support/com.bohemiancoding.sketch3/Plugins
but when I execute npm run watch I get the following error
amar#admin:~$ npm run watch
npm ERR! path /Users/amar/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/Users/amar/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/amar/.npm/_logs/2017-11-08T04_14_49_190Z-debug.log

The error message says /Users/amar/package.json cannot be found. Looks like you ran the npm command in /Users/amar folder. Please run in the folder where you cloned the project, so npm can find package.json

Related

Npm run server doest work/ cant run server with

command "npm run serve" doest work, and i get this:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\user/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\user\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in: <>br
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2022-02-24T23_43_08_331Z-debug-0.log
I tried reinstalling/ installing the node, npm, i tried and didnt work:
npm config set ignore-scripts false
It looks like you are executing NPM from your user home directory. You need to run it in a project directory, and then run npm init, along with the corresponding npm install <X> commands. Do not run init if the project is already initialized.

unable to run the react project- the following error enoent ENOENT

Whenever I am running npm start in my project it displays the following error
npm ERR! code ENOENT npm ERR! syscall open npm ERR! path
/home/abhi/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no
such file or directory, open '/home/abhi/package.json' npm ERR! enoent
This is related to npm not being able to find a file. npm ERR! enoent
npm ERR! A complete log of this run can be found in: npm ERR!
/home/abhi/.npm/_logs/2020-12-17T04_15_31_411Z-debug.log
abhi#Abhi:~/Projects/demo1$
I tried everything to fix the issue but did not find a solution.
what I am missing in JSON.package ??
You need to navigate to your app directory to be able to run npm start.
seems you are running it out of that directory.
type
cd "your app path"
then
npm start
is your package initialised at all? did you run
npm init
or your dependencies and their versions are correct? and the node version too?
Clear everything from the cache and try installing again
npm cache clean

npm not installing packages on WSL

I keep running into an issue with npm not installing packages.
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /mnt/c/Users/zhelf/downloads/test/node_modules/ansi-regex
npm ERR! dest /mnt/c/Users/zhelf/downloads/test/node_modules/.ansi-regex.DELETE
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/mnt/c/Users/zhelf/downloads/test/node_modules/ansi-regex' -> '/mnt/c/Users/zhelf/downloads/test/node_modules/.ansi-regex.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/zhelf/.npm/_logs/2020-08-05T16_06_33_155Z-debug.log
this is the error it keeps giving me I am running windows 10 with WSL and ubuntu 20.04 I have tried through the regular terminal and the terminal in vscode as well. I have tried googling the problem have cleared the npm cache and I get the same problem I was trying to install express but tried other packages as well and I keep getting the same error.
Ok, I found the issue I needed to run the npm install -g build-tools, and package install it again.

Downloading/Running another persons React App

I downloaded off Github a friends react app to see what some functions are doing and design. I've been trying to run the application but keep running into errors. I extracted the folder out of the Zip file and in the command line run npm install and then doing npm start the error I encounter is the following:
PS C:\WINDOWS\System32\WindowsPowerShell\v1.0> npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\WINDOWS\System32\WindowsPowerShell\v1.0\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open
'C:\WINDOWS\System32\WindowsPowerShell\v1.0\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\RafayChaudhary\AppData\Roaming\npm-cache\_logs\2020-02-
03T19_49_57_690Z-debug.log
Please let me know what i am doing wrong.
Your PowerShell directory is pointing to the System dir for PowerShell i.e.
PS C:\WINDOWS\System32\WindowsPowerShell\v1.0>
You need to change this to the directory of your React app e.g.
cd C:\Path\To\React\App
npm i && npm start

npm run watch doesn't run: no such file or directory, open '/Users/usr/package.json'

I believe this might be happening because I used brew to install npm; I think I might have two different versions. Here is the error:
npm run watch
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/Cellar/node/5.4.1_1/bin/node" "/usr/local/bin/npm" "run" "watch"
npm ERR! node v5.4.1
npm ERR! npm v3.5.3
npm ERR! path /Users/Nicolas/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/Users/Nicolas/package.json'
npm ERR! enoent ENOENT: no such file or directory, open '/Users/Nicolas/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Nicolas/Code/wordpress/wp-content/themes/IMFA-theme/npm-debug.log
I have tried the following:
brew doctor (gives a lot of warnings and doesn't seem to change anything)
brew unlink and re-link (doesn't seem to do anything)
For what it's worth, I uninstalled and re-installed brew recently, and I know there are some unlinked kegs; I see this when I run brew doctor, but I don't know how to resolve it.
Other npm commands still seem to work, like npm install. However, npm run watch, in a directory where I want to compile SCSS, is giving me the error above. Any help is appreciated
I met the same problem npm err no such file or directory, open '/Users/usr/package.json' and I got the solution.
to solve the problem,you need to init your environment,like $ xxx init ,then use npm install to install the dependences.

Resources