got the Error lerna ERR! npm run dev exited 1 in 'frontend' - npm

I Run the command '''npm run dev''' but i got the error lerna ERR! npm run dev exited 1 in 'frontend' my node version is :16.10.0 and npm version is :8.5.1.
I have no idea where is the problem.

Related

Got errs with puppeteer and node-sass running npm i

I have a double problem.
The work environment is in Vue and Nuxt, with a mac M1 pro.
Until last week, I had no problems, everything was running perfect. They changed my mac and the world stopped running.
I download 2 repos, but when running npm i, one explodes with puppeteer and the other with node-sass.
npm ERR! code ELIFECYCLE npm ERR! error 1 npm ERR! puppeteer#8.0.0 install:nodeinstall.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the puppeteer#8.0.0 install script.
npm ERR! code ELIFECYCLE npm ERR! error 1 npm ERR! node-sass#4.14.1 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass#4.14.1 postinstall script.
I am using the correct version of Node.
I tried deleting the package-lock.json and the node_modules, clearing the npm cache, and running npm i again, and no, it breaks.
I tried installing those specific packages outside of npm i, and I get the same error.
I tried creating a .npmrc file with
registry=https://registry.npmjs.org always-auth=true //registry.npmjs.org/: "token"
I am using the same package.json and the same repos as my peers. They also have mac M1 and have no problem.
On Github we have the same permissions.
Any idea what is happening?
Thank you very much in advance \o/
You can use sass instead of node-sass. This is because node-sass has been deprecated.
npm uninstall node-sass
npm install sass
Works all the same, no need to make any other changes

nextjs Build failed because of webpack errors on CentOS 7

I want to deploy a nextjs application on a centos server. But when i try to build using npm run build it gives me the following error
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist#latest --update-db
info - Creating an optimized production build
Failed to compile.
ModuleNotFoundError: Module not found: Error: Can't resolve '../context/auth/AuthState' in '/var/www/html/projectname/pages'
> Build error occurred
Error: > Build failed because of webpack errors
at build (/var/www/html/projectname/node_modules/next/dist/build/index.js:15:918)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client-ubii-app#0.1.0 build: `next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client-ubii-app#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! /root/.npm/_logs/2021-03-31T21_10_01_066Z-debug.log
But when i do the same on my local machine runnig windows 10 it works fine
If you has been change in name of file or folder only case sensitive character, this problem may be happen if your remote branch is not updated. Please, make sure if remote branch has the old name of file or folder. If true, fix it because the CentOs is Linux, so file and folder with same words in lower case is different with upper case.

error while running "npm run build" in vue application

I have cloned vue application from git hub(https://github.com/jimmerioles/progressive-weather-app), for automating the deployment in jenkins. Before doing it, i am checking in my ubuntu machine(GCP vm). There i have installed java,nodejs, npm and vuecli. When i execute a command "npm run build" getting the below error. I tried re-installing vuecli, nodejs and npm also., still getting the same error. Kindly let me know how can i fix this.
npm version is "6.2.0", nodejs version is "v14.3.0" and vuecli is a latest one.
root#instance-2:~/weather/src# npm run build
> PWeatherApp#0.1.0 build /root/weather
> vue-cli-service build
sh: 1: vue-cli-service: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! PWeatherApp#0.1.0 build: `vue-cli-service build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the PWeatherApp#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-05-23T18_32_20_092Z-debug.log
its may help you:
npm install -g #vue/cli
# OR
yarn global add #vue/cli

Unhandled 'error' event when run npm install

When I run mvnw -Pdev,webpack command, I got this error. I will appreciate if anyone could help me.
--- frontend-maven-plugin:1.6:npm (npm install) # demoapp ---
Running 'npm install' in C:\Users\pc\demoapp
> demoapp#0.0.0 postinstall C:\Users\pc\demoapp
> webdriver-manager update --gecko false
[09:55:46] I/config_source - curl -oC:\Users\pc\demoapp\node_modules\protractor\node_modules\webdriver-manager\selenium\standalone-response.xml https://selenium-release.storage.googleapis.com/
[09:55:46] I/config_source - curl -oC:\Users\pc\demoapp\node_modules\protractor\node_modules\webdriver-manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/
events.js:183
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TLSWrap.onread (net.js:622:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! demoapp#0.0.0 postinstall: `webdriver-manager update --gecko false`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the demoapp#0.0.0 postinstall 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\pc\AppData\Roaming\npm-cache\_logs\2018-10-16T06_55_48_437Z-debug.log
I ran into the same symptoms because of an inconsistent node_modules/ state.
Deleting node_modules/ and running npm install --verbose solved my issue. Even despite the --verbose flags, the installation process may not show progress for four and more minutes. Checking for a changing directory size of node_modules/ regularly calmed me down and let me know the installation kept going on.
When using Windows 10 Powershell, the solution to this for me was to run Powershell as Administrator.
Prior to that, I tried deleting nodes_modules/ as described in https://stackoverflow.com/a/53558340/1207532 but that didn't make any difference for me.

npm start command with webpack on Windows 10 fails

I am currently using node to build a website. I have run the webpack dev server fine in ubuntu but in windows i cant seem to get the npm start command to work
I am able to npm run build-sw on both platforms without error but just not able to run.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! site#1.0.0 start: `npm run build-sw && ./node_modules/.bin/webpack-dev-server --progress --host 0.0.0.0 --no-info --watch-poll`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the site#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
This
I finally was able to get the project running using YARN.
It needed no configuration change.
I had to install Visual C++ but after that
yarn and yarn run start did the trick.
So on ubuntu I use npm but on windows i use yarn. Works now