error when trying to git clone and launch locally - node.js

i've cloned a few projects successfully, but am having trouble with the latest one...see below
i've done the following (and have repeated the process in deleting and starting from scratch a few times now)
- git clone, cd / "project x", yarn install
BUT when i try to "yarn start", i run into errors...
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app#0.1.0 open:src: babel-node tools/server.js development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the trading-app#0.1.0 open:src script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
*note: i'm a little new at this, so any step by step guide would be appreciate!!

Related

NextJS not running on MacOS even after installing modules

So I've just created a NextJS project using create-next-app which went smoothly as expected. Then ran npm i just to be sure and saw all modules installed into node_modules
When I try to run npm run dev to start my nextjs app. it just says
sh: next: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! test#0.1.0 dev: `next dev`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the test#0.1.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/john.v.n.pakson/.npm/_logs/2022-10-06T08_01_29_725Z-debug.log
It seems like npm is not detecting the node_modules i have installed.
Not sure if this is a mac or a zsh issue.
I'm using node version 12.22.12
Upgraded to 16.17.1 and still see the same error
> test#0.1.0 dev
> next dev
/var/folders/6y/xtlzp4z16dj0stxnqx8znj8w0000gn/T/dev-01c08137.sh: line 1: next: command not found
Okay I figured it out. It was caused by my file path on macos. My project was on a folder called Project/Test which might have confused zsh or mac. This in turn caused npm to not be able to find the correct scripts on my node_modules
When I moved my project to another folder I was already able to run npm run dev properly.
Cheers!

laravel 8 instalation error - npm run dev throws error

I am trying to install a fresh laravel 8 project. After downloading frontend scaffolding when I try to run npm run dev it gives me an error. This problem also happens during installing jetstream in this npm run dev. I am giving error below.
unkno#DESKTOP-NAP4DRR MINGW64 /c/laravel projects/example
$ npm run dev
> # dev C:\laravel projects\example
> npm run development
> # development C:\laravel projects\example
> mix
[webpack-cli] Running multiple commands at the same time is not possible
[webpack-cli] Found commands: 'bundle', 'projects\example\node_modules\laravel-mix\setup\webpack.config.js'
[webpack-cli] Run 'webpack --help' to see available commands and options
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # development: `mix`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\unkno\AppData\Roaming\npm-cache\_logs\2021-01-09T03_39_54_620Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # dev: `npm run development`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\unkno\AppData\Roaming\npm-cache\_logs\2021-01-09T03_39_54_704Z-debug.log
I experienced the same problem a few weeks ago. What I figured out was that on windows that instead of running the command npm install && npm run dev it needed to be npm install and npm run-dev.
Also make sure you have the latest node and npm versions install. Perform a npm audit fix as well to fix any vulnerabilities.
I can see you are a Windows developer, and that you have spaces in the name of your project folder. Windows, spaces and nodejs don't like to behave very nicely together.
Try removing the spaces from name of your project path and see if this addresses the issue for you.
Update: As per a similar question, Laravel, error when running npm run dev on fresh new installation, this solved the users issue.
Try doing a full reset:
rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install
It works for me, on Laravel 9
Thanks to Sir Jeffrey Way

Issue while executing " npm start" command

I am working on Frontend side Project. I create React_app and after that I run the 'npm start' command it returns an error. The error is as follows.
(hello) D:\NewPython\DockerDjangoReactProject\frontend\react_app>npm start
> react_app#0.1.0 start D:\NewPython\DockerDjangoReactProject\frontend\react_app
> react-scripts start
'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react_app#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react_app#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2020-12-01T05_06_13_740Z-debug.log
please help me solve this problem, I want to complete my project but this error is in my way.
This issue is with react-scripts. Possibilities are
react-scripts is not installed. In this case, you can manually install using this command.
npm install react-scripts --save
Or if it is already there, then it might be the problem with node_modules folder. You can remove this folder and/or run the following command.
npm install

Problem starting Electron app - [603:0827/215406.435140:FATAL:electron_main_delegate.cc(264)] Running as root without --no-sandbox is not supported

I am trying to set up a electron project. I have followed this tutorial and the previous ones.
But when I get to "Running your App" and type npm start, I get the following message:
myApp#1.0.0 start ***PATH***
electron .
[603:0827/215406.435140:FATAL:electron_main_delegate.cc(264)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
***PATH***/node_modules/electron/dist/electron exited with signal SIGTRAP
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myApp#1.0.0 start: `electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myApp#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/tobias/.npm/_logs/2020-08-27T11_54_06_541Z-debug.log
npm version: 6.14.6
node.js version: 12.18.3
I'm using the WSL terminal in Visual Studio code.
I have tried installing the electron-quick-start package with the same outcome.
I don't know if it helps but in your package.json try changing the start script into
"start": "electron --no-sandbox ."

Parcel command not found

In my project, I use Parcel to bundle everything. Now, I am at the point where I need to deploy my app.
I clone my git repo with my React app and I put in the Node server.
I tried every command possible to install parcel, but I always get the following error :
> pp-react#0.1.0 build /home/volodymk/react
> parcel build index.html
sh: parcel: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! pp-react#0.1.0 build: `parcel build index.html`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pp-react#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/volodymk/.npm/_logs/2020-01-12T19_26_22_634Z-debug.log
How can I fix this ?
To run any installed node package (not just Parcel), use npx, the utility command shipped with npm. It executes packages that come with a runtime command in your node_modules/packagename/.bin directories.
As in npx parcel build index.html
More information available in the npx readme.

Resources