npm - How to fix error code ELIFECYCLE after updating #angular/cli - node.js

I have this error after updating #angular/cli both global and local to the latest version. I've tried cleaning cache, deleting node modules folder and reinstalling but the error still persists. Hope someone knows how to fix this.
Here is the full console log when I ran npm after updating:
PS D:\KIS\Name-Card-Frontend-Project> npm start
name-card-angular#0.0.0 start D:\KIS\Name-Card-Frontend-Project
ng serve --host 0.0.0.0 --proxy-config proxyconfig.json
trustedSubscriber._addParentTeardownLogic is not a function
TypeError: trustedSubscriber._addParentTeardownLogic is not a function
at MergeMapSubscriber.Subscriber [as constructor] (D:\KIS\Name-Card-Frontend-Project\node_modules\rxjs\internal\Subscriber.js:45:43)
at MergeMapSubscriber.OuterSubscriber [as constructor] (D:\KIS\Name-Card-Frontend-Project\node_modules\rxjs\internal\OuterSubscriber.js:20:42)
at new MergeMapSubscriber (D:\KIS\Name-Card-Frontend-Project\node_modules\rxjs\internal\operators\mergeMap.js:48:28)
at MergeMapOperator.call (D:\KIS\Name-Card-Frontend-Project\node_modules\rxjs\internal\operators\mergeMap.js:39:33)
at Observable.subscribe (D:\KIS\Name-Card-Frontend-Project\node_modules\rxjs\internal\Observable.js:24:22)
at D:\KIS\Name-Card-Frontend-Project\node_modules\#angular\cli\node_modules\rxjs\internal\util\subscribeToObservable.js:10:20
at Object.subscribeToResult (D:\KIS\Name-Card-Frontend-Project\node_modules\#angular\cli\node_modules\rxjs\internal\util\subscribeToResult.js:7:45)
at MergeMapSubscriber._innerSub (D:\KIS\Name-Card-Frontend-Project\node_modules\#angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:75:38)
at MergeMapSubscriber._tryNext (D:\KIS\Name-Card-Frontend-Project\node_modules\#angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:72:14)
at MergeMapSubscriber._next (D:\KIS\Name-Card-Frontend-Project\node_modules\#angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:55:18)
at MergeMapSubscriber.Subscriber.next (D:\KIS\Name-Card-Frontend-Project\node_modules\#angular\cli\node_modules\rxjs\internal\Subscriber.js:64:18)
at MapSubscriber._next (D:\KIS\Name-Card-Frontend-Project\node_modules\#angular\cli\node_modules\rxjs\internal\operators\map.js:52:26)
at MapSubscriber.Subscriber.next (D:\KIS\Name-Card-Frontend-Project\node_modules\#angular\cli\node_modules\rxjs\internal\Subscriber.js:64:18)
at TapSubscriber._next (D:\KIS\Name-Card-Frontend-Project\node_modules\#angular\cli\node_modules\rxjs\internal\operators\tap.js:62:26)
at TapSubscriber.Subscriber.next (D:\KIS\Name-Card-Frontend-Project\node_modules\#angular\cli\node_modules\rxjs\internal\Subscriber.js:64:18)
at MergeMapSubscriber.notifyNext (D:\KIS\Name-Card-Frontend-Project\node_modules\#angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:84:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! name-card-angular#0.0.0 start: ng serve --host 0.0.0.0 --proxy-config proxyconfig.json
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the name-card-angular#0.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! C:\Users\Dell\AppData\Roaming\npm-cache_logs\2018-09-21T17_34_25_541Z-debug.log
UPDATE
The error disappeared after commenting the _addParentTeardownLogic function from the file at the link above. There're some times the code works fine when commenting error function of the modules. Really don't know why they added these functions just to be commented?

Related

Npm React js start error - ELIFECYCLE ERRNO1

The system cannot find the path specified.
npm ERR!
code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-able-pro#1.0.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-able-pro#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:
ive got some error when i npm start, it always like this when i restart my pc,
ive already use
npm cache clear --force
deleting my modules app and package-lock.jason
npm install
and its doesnt work at all, can you guys help me ?
The library that you are trying to run is "react-able-pro". Through a search on www.npmjs.com for this library, I was not able to find it. However I was able to find react-table-pro.
It looks like a typo. try to fix your package.json file dependencies/devDependencies and then try to reinstall

NPM run dev error after requiring Tailwind CSS

I'm just dipping my toes into using Laravel for the first time, and I've had many issues so far. I've figured them out myself so far, but this one is driving me crazy!
After adding the line require('tailwindcss') in my webpack.mix.js file, I keep getting the following error when I run.
npm run dev
✖ Mix
Compiled with some errors in 452.52ms
ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
TypeError: Cannot read property 'config' of undefined
at getTailwindConfig (/home/timothy/blog/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:81:62)
at /home/timothy/blog/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:124:92
at /home/timothy/blog/node_modules/tailwindcss/lib/processTailwindFeatures.js:41:11
at plugins (/home/timothy/blog/node_modules/tailwindcss/lib/index.js:20:104)
at LazyResult.runOnRoot (/home/timothy/blog/node_modules/postcss/lib/lazy-result.js:339:16)
at LazyResult.runAsync (/home/timothy/blog/node_modules/postcss/lib/lazy-result.js:393:26)
at LazyResult.async (/home/timothy/blog/node_modules/postcss/lib/lazy-result.js:221:30)
at LazyResult.then (/home/timothy/blog/node_modules/postcss/lib/lazy-result.js:206:17)
at processResult (/home/timothy/blog/node_modules/webpack/lib/NormalModule.js:751:19)
at /home/timothy/blog/node_modules/webpack/lib/NormalModule.js:853:5
at /home/timothy/blog/node_modules/loader-runner/lib/LoaderRunner.js:399:11
at /home/timothy/blog/node_modules/loader-runner/lib/LoaderRunner.js:251:18
at context.callback (/home/timothy/blog/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
at Object.loader (/home/timothy/blog/node_modules/postcss-loader/dist/index.js:142:7)
1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 2 errors
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: `mix`
npm ERR! Exit status 1
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! /home/timothy/.npm/_logs/2022-01-18T04_24_37_451Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # dev: `npm run development`
npm ERR! Exit status 1
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! /home/timothy/.npm/_logs/2022-01-18T04_24_37_460Z-debug.log
I've looked into my version of Node.js and PostCSS being an issue, as my version of node.js has been an issue that caused other problems I've had so far, but those two seem fine. If it matters, this is a Laravel project created with Composer on Ubuntu 20.04 with Laravel installer 4.2.9.
Just run this comman. Tailwind config file is missing.
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init

next.js error: Error: > Build failed because of webpack errors

I'm trying to deploy a nextJs app but when I run npm run build I see some of the errors listed below:
Build error occurred
Error:
Build failed because of webpack errors
at /Users/hassan/Upwork/ROCProjectNext.js/ROCNext/node_modules/next/dist/build/index.js:15:918
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /Users/hassan/Upwork/ROC Project Next.js/ROC- Next/node_modules/next/dist/build/tracer.js:1:525
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! admin-1.0#0.1.0 build: next build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the admin-1.0#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!
/Users/hassan/.npm/_logs/2021-04-07T06_52_28_325Z-debug.log
any suggestions?
Kindly check your nextjs version in package.json file it is upgraded to latest version. Downgrade the version of nextjs it will help you to avoid this error.

framework7 stuck at executing npm scripts and start npm throws a bunch of errors

i am new to the framework and was just going through a tutorial and encountered by an error after pressing create app in the local host
Generating package.json
✔ Creating required folders structure
✔ Installing NPM Dependencies
✔ Installing NPM Dev Dependencies
Executing NPM Scripts
this happens its stuck at executing NPM scripts waited a whole 3 hours still executing
The start npm command shows the following:-
> whatchat#1.0.0 start C:\Users\piyush\whatchat
> npm run dev
> whatchat#1.0.0 dev C:\Users\piyush\whatchat
> cross-env NODE_ENV=development webpack-dev-server --config ./build/webpack.config.js
internal/modules/cjs/loader.js:1032
throw err;
^
Error: Cannot find module 'C:\Users\piyush\whatchat\build\webpack.config.js'
Require stack:
- C:\Users\piyush\whatchat\node_modules\webpack-cli\bin\utils\convert-argv.js
- C:\Users\piyush\whatchat\node_modules\webpack-dev-server\bin\webpack-dev-server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)
at Function.Module._load (internal/modules/cjs/loader.js:898:27)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at WEBPACK_OPTIONS (C:\Users\piyush\whatchat\node_modules\webpack-cli\bin\utils\convert-argv.js:114:13)
at requireConfig (C:\Users\piyush\whatchat\node_modules\webpack-cli\bin\utils\convert-argv.js:116:6)
at C:\Users\piyush\whatchat\node_modules\webpack-cli\bin\utils\convert-argv.js:123:17
at Array.forEach (<anonymous>)
at module.exports (C:\Users\piyush\whatchat\node_modules\webpack-cli\bin\utils\convert-argv.js:121:15)
at Object.<anonymous> (C:\Users\piyush\whatchat\node_modules\webpack-dev-server\bin\webpack-dev-server.js:84:40) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\piyush\\whatchat\\node_modules\\webpack-cli\\bin\\utils\\convert-argv.js',
'C:\\Users\\piyush\\whatchat\\node_modules\\webpack-dev-server\\bin\\webpack-dev-server.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! whatchat#1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --config ./build/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the whatchat#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! C:\Users\piyush\AppData\Roaming\npm-cache\_logs\2020-12-15T14_13_28_671Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! whatchat#1.0.0 start: `npm run dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the whatchat#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! C:\Users\piyush\AppData\Roaming\npm-cache\_logs\2020-12-15T14_13_28_828Z-debug.log
i searched lot on Google and discord coding help servers but could not fix this please help me out
you probably didn't install cordova before try:
npm install -g cordova

Laravel-mix - BrowserSync throwing an error at event.js:160

Not sure if the problem is related to laravel-mix, but I am having problem with Browsersync package. Here is my mix.js:
mix.js('resources/assets/js/app.js', 'public/js')
.browserSync({proxy: 'localhost:8000'})
.sass('resources/assets/sass/app.scss', 'public/css');
When I run npm run watch-poll ( watch doesn't pick up the changes, hence the watch-poll see here ) I get the following error on the console:
[Browsersync] Watching files...
events.js:160
throw er; // Unhandled 'error' event
^
Error: watch resources/views/auth/passwords ENOSPC
at exports._errnoException (util.js:1020:11)
at FSWatcher.start (fs.js:1443:19)
at Object.fs.watch (fs.js:1470:11)
at createFsWatchInstance (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleDir (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:407:19)
at FSWatcher.<anonymous> (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:455:19)
at FSWatcher.<anonymous> (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:460:16)
at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch-poll"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # watch 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/tanmay/.npm/_logs/2017-08-07T07_02_31_677Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # watch-poll: `npm run watch -- --watch-poll`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # watch-poll 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/tanmay/.npm/_logs/2017-08-07T07_02_31_725Z-debug.log
I am on: Ubuntu 16.04.3 (Not a VM). Running: Nodejs v6.11.2, NPM v5.3.0
When I comment out the .browserSync() call from my mix.js:
mix.js('resources/assets/js/app.js', 'public/js')
// .browserSync({proxy: 'localhost:8000'})
.sass('resources/assets/sass/app.scss', 'public/css');
however, the error no longer persists. How do I get around the problem? Please feel free to ask any other necessary information.
Here is my package.json file
UPDATE: This error doesn't occur on a new laravel project. To get the same result as a new project, this is what I did:
I removed the node modules: rm -rf node_modules I removed the package-lock.json file: rm package-lock.json I re-run: npm install, npm run dev, npm run watch-poll
Result: still same error :(
This might be due to another task running on port 4040 already.
You can try killall -9 node
Source/more details: https://github.com/parse-community/parse-dashboard/issues/401#issuecomment-224007436
I suspect it's the same problem that is shown & with working solution from Gulp Error: watch ENOSPC
Try this: Why this issue occured? There is the limit in the number of
files that can be watched in a system. We have to increase this
number. The below command can be used to increase this number.
$ echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Resources