While upgrading Angular from version 5.0 to 6.1, facing npm Error: Unknown argument: serve - npm

Error: Unknown argument: serve
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-io-example#1.0.0 start: ng serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-io-example#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Please provide some solution for this, as I am stuck, not able to run my Angular application.

Encountered the same problem when setting up my development environment on different machine.
Use npm run serve instead. It worked to me.

Related

NPM issue using React

I currently have an issue where I can no longer work, with a machine that I bought using NPM. The issue does not run using npm start.
david#Davids-MacBook-Pro happy % npm start
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! happy#0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the happy#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! /Users/david/.npm/_logs/2020-08-09T06_56_49_544Z-debug.log
This is the main issue. Also have "2020-08-09T06_56_49_544Z-debug.log"
Can anyone help me...
Thanks you,
David
The NPM One
2020-08-09T06_56_49_544Z-debug.log
You are trying to run this from your /Users/david/ directory. You need to navigate to the root of your project (where package.json is), then do npm start:
$ cd path/to/my/project
$ npm start
Update:
Add that babel-eslint package to your package.json.
Show your directory tree inside users/David/happy
Thanks very much. I have finally been able to make NPM work using because there are two different type of sites ~/david and ~/david/happy.
I completely removed the NPM of ~/david, and now only have NPM for ~/david/happy working now.
the issue is
https://github.com/facebook/create-react-app/issues/8781

Unable to build my Vuejs application using npm run build

When I run npm run build in my Vuejs application I get the following error:
compiler.hooks.compilation.tap(
^
TypeError: Cannot read property 'compilation' of undefined
at OptimizeCssAssetsWebpackPlugin.apply (C:\Users\EFOSA\Desktop\my_project\client\node_modules\last-call-webpack-plugin\src\index.js:170:20)
at Compiler.apply (C:\Users\EFOSA\Desktop\my_project\client\node_modules\tapable\lib\Tapable.js:375:16)
at webpack (C:\Users\EFOSA\Desktop\my_project\client\node_modules\webpack\lib\webpack.js:33:19)
at err (C:\Users\EFOSA\Desktop\my_project\client\build\build.js:19:3)
at next (C:\Users\EFOSA\Desktop\my_project\client\node_modules\rimraf\rimraf.js:75:7)
at CB (C:\Users\EFOSA\Desktop\my_project\client\node_modules\rimraf\rimraf.js:111:9)
at C:\Users\EFOSA\Desktop\my_project\client\node_modules\rimraf\rimraf.js:137:14
at FSReqWrap.oncomplete (fs.js:154:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my_project#1.0.0 build: node build/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my_project#1.0.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! C:\Users\EFOSA\AppData\Roaming\npm-cache_logs\2019-07-02T07_51_40_908Z-debug.log
I'm running webpack 3.12.
Could someone please help me with this?
There is a problem with your configuration and/or plugin version. Check the optimize-css-assets-webpack-plugin documentation:
For webpack v3 or below please use
optimize-css-assets-webpack-plugin#3.2.0. The
optimize-css-assets-webpack-plugin#4.0.0 version and above supports
webpack v4.

Nuxt.js: fsevents is not a constructor

I'm using MacOS Mojave 10.14.5. When I run 'npm run dev' command where the nuxt starter package is located, I have 'fsevents' error, and the server doesn't work.
I already reinstall node and npm several times, but it doesn't work.
Here's an error:
/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:28
return (new fsevents(path)).on('fsevent', callback).start();
^
TypeError: fsevents is not a constructor
at createFSEventsInstance (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:28:11)
at setFSEventsListener (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:82:16)
at FSWatcher.FsEventsHandler._watchWithFsEvents (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:252:16)
at FSWatcher.<anonymous> (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:386:25)
at LOOP (fs.js:1570:14)
at process._tickCallback (internal/process/next_tick.js:61:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nuxt_test_b#1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nuxt_test_b#1.0.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/kimgyun/.npm/_logs/2019-06-06T02_11_18_374Z-debug.log
How can I run this nuxt.js server without this error?
It's a problem with fs events, and a rather annoying one at that. Specifically this happens when you're using Node 12.
You'll need to install fsevents#1.2.9 explicitly:
npm i fsevents#1.2.9 -D
or
yarn add fsevents#1.2.9 -D
This should work for you at this point.

npm install package.js - can I revert to earlier package?

I am following this tutorial on vue.js on YouTube. One of the packages I installed was eslint 5.5 (which is the current version). I saw this error message:
npm ERR! Failed at the server#1.0.0 lint script 'eslint **/*.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! eslint **/*.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls server
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/jason/Documents/vue-movie/server/npm-debug.log
I tried updating Node and NPM, but that did not change this failure. The tutorial is using "^4.6" and I was wondering if there is a way to revert the package I have to an earlier version? And how would I do that?

Why npm start is not working and giving the following error messages:

I have one question regarding npm. Whenever I start npm, it gives the following error:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pomodorclock#1.0.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pomodorclock#1.0.0 start 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?
You first need to run npm install before you can build the package. After you can use npm start.