npm run watch on laravel 6 has many warning and errors - laravel

When I run npm install on Laravel 6
I get the following errors:
C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master>npm install
npm WARN deprecated babel-preset-es2015#6.24.1: � Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated fsevents#1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
npm WARN deprecated core-js#2.6.10: core-js#<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated hawk#3.1.3: This module moved to #hapi/hawk. Please make sure to switch over as this distribution is no longer supported
and may contain bugs and critical security issues.
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated cryptiles#2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp#1.0.9: This module moved to #hapi/sntp. Please make sure to switch over as this distribution is no longer supported
and may contain bugs and critical security issues.
npm WARN deprecated hoek#2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom#2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
> node-sass#4.13.0 postinstall C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master\node_modules\node-sass
> node scripts/build.js
Binary found at C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master\node_modules\node-sass\vendor\win32-x64-72\binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 1107 packages from 781 contributors and audited 14707 packages in 526.859s
found 21 vulnerabilities (2 low, 12 moderate, 7 high)
run `npm audit fix` to fix them, or `npm audit` for details
And after I run npm audit fix --force then npm run watch return following errors:
Error: Cannot find module 'C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master\node_modules\cross-env\bin\cross-env.js'
←[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:687:27)←[39m
←[90m at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)←[39m
←[90m at internal/main/run_main_module.js:17:11←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # watch: `node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
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! C:\Users\Hamid\AppData\Roaming\npm-cache\_logs\2019-12-02T05_33_19_426Z-debug.log
I also cleared the npm cache several times and reinstall npm but problem not solve

Related

Windows npm installation error by github repo

I tried to clone a github repo with the instructions given in the readme here.
If I do npm ci or npm i I get many errors:
npm WARN deprecated mkdirp-promise#5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated debug#3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated multicodec#1.0.4: This module has been superseded by the multiformats module
npm WARN deprecated uuid#2.0.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid#2.0.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated multibase#0.6.1: This module has been superseded by the multiformats module
npm WARN deprecated multibase#0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated uuid#3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated multicodec#0.5.7: This module has been superseded by the multiformats module
npm WARN deprecated cids#0.7.5: This module has been superseded by the multiformats module
npm ERR! code 1
npm ERR! path C:\Users\danis\axelar-local-gmp-examples\node_modules\#axelar-network\axelar-cgp-aptos
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c C:\Users\danis\AppData\Local\Temp\postinstall-f5a513bd.cmd
npm ERR! > #axelar-network/axelar-cgp-aptos#1.0.2 build
npm ERR! > run-s build-aptos
npm ERR!
npm ERR!
npm ERR! > #axelar-network/axelar-cgp-aptos#1.0.2 build-aptos
npm ERR! > ./aptos/build.sh
npm ERR! Der Befehl "." ist entweder falsch geschrieben oder
npm ERR! konnte nicht gefunden werden.
npm ERR! ERROR: "build-aptos" exited with 1.
npm ERR! ERROR: "build" exited with 1.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\danis\AppData\Local\npm-cache\_logs\2023-01-27T14_25_45_549Z-debug-0.log
The bad thing is, after that I wanted to install npm i dotenv, what worked fine till now, but that also gives me an error looking quite similar.
Can someone help me solving this?
Thank you!!!

Creating new code sharing project in Nativescript gives dependency error on tslint and tslint-rules

I'm working on a Nativescript project that needs to be converted into native Android code. I have little Nativescript experience so I'm doing a tutorial on "code sharing".
https://docs.nativescript.org/code-sharing/creating-a-new-project
I've gone through the setup and have all dependencies installed. I can confirm this with tns doctor:
✔ Getting environment information
No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 12.4.0 satisfies minimum required version 10.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 7.2.1 version and is up to date.
Then I've run the 2 mentioned commands:
$ npm i -g #nativescript/schematics
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: typescript#4.2.3
npm WARN node_modules/#nativescript/schematics/node_modules/typescript
npm WARN peer typescript#">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev" from tslint#5.20.1
npm WARN node_modules/#nativescript/schematics/node_modules/tslint
npm WARN peer tslint#"^5.16.0" from #nativescript/tslint-rules#0.0.5
npm WARN node_modules/#nativescript/schematics/node_modules/#nativescript/tslint-rules
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript#"^3.4.0" from #nativescript/tslint-rules#0.0.5
npm WARN node_modules/#nativescript/schematics/node_modules/#nativescript/tslint-rules
npm WARN #nativescript/tslint-rules#"~0.0.5" from #nativescript/schematics#11.0.0
npm WARN node_modules/#nativescript/schematics
changed 88 packages in 11s
12 packages are looking for funding
run `npm fund` for details
And then the second one, but the issue seems to be already in the first command:
$ ng new --collection=#nativescript/schematics hello-world --shared
⠏ Installing packages (npm)...npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: hello-world#0.0.0
npm ERR! Found: tslint#6.1.3
npm ERR! node_modules/tslint
npm ERR! dev tslint#"~6.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer tslint#"^5.16.0" from #nativescript/tslint-rules#0.0.5
npm ERR! node_modules/#nativescript/tslint-rules
npm ERR! dev #nativescript/tslint-rules#"~0.0.5" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/jclermonts/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jclermonts/.npm/_logs/2021-03-27T16_45_09_004Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.
Any help would be greatly appreciated.
This issue seems to be the same. I've also tried --force and --legacy-peer-deps
Downgrading node as suggested in this thread I could try as a last resort but the question does not answer which specific version I should downgrade to then.

In terminal 'tns preview' command not working. (NativeScript)

I wanted to run my NS application in local. I downloaded project from play.nativescript.org, And I open cmd with target path and I followed this steps
Step 1. Install the latest NativeScript CLI
Type the following command in a Command Prompt or Terminal.
npm install -g nativescript#latest
and I have successfully installed the NativeScript CLI
Step 2. Preview your app
Navigate to your project folder and run the following command to start
previewing your app.
tns preview
When I entered the command I get this errors
You are using the deprecated nsconfig.json file. Just be aware that NativeScript 7 has an improved nativescript.config.(js|ts) file for when you're ready to upgrade this project.
npm WARN deprecated bfj-node4#5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! code E404
npm ERR! 404 Not Found - GET https://github.com/thomasconner/javascript/tarball/67b7944366453a87226389d483ac1ad861e0e129npm ERR! 404
npm ERR! 404 'pubnub#https://github.com/thomasconner/javascript/tarball/67b7944366453a87226389d483ac1ad861e0e129' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'kinvey-nativescript-sdk'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dotor\AppData\Roaming\npm-cache\_logs\2020-10-01T09_47_56_177Z-debug.log
Command npm.cmd failed with exit code 1
As in github.com therosko has written, making kinvey-nativescript-sdk version as 5.0.1 worked for me. Src: here
Unfortunately, play.nativescript.org exported projects won't run with nativescript version 7 and up.
Currently, the only solution would be to install {N} CLI using npm install -g nativescript#6.8.0

How I can solve npm installtion problem to laravel project

when i run npm i it returns the error.
C:\xampp\htdocs\personal\freshShop>npm i
**
npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! Unexpected end of JSON input while parsing near '...3ec2605d1fc435f4d8651' **
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Najmun_Nafiz\AppData\Roaming\npm-cache\_logs\2020-06-04T02_02_30_082Z-debug.log
Delete node_modules, 'package-lock.json' and clean your npm cache via:
npm cache clean --force
I solved this exact issue by upgrading my NodeJS version to 14.x.

Error installing Composer on Ubuntu

I am trying to install Composer on Ubuntu 14.04. I was able to install the prerequisites. When installing composer, I get the following error. How to fix it?
npm install -g composer-cli
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
/root/.nvm/versions/node/v6.11.2/bin/composer -> /root/.nvm/versions/node/v6.11.2/lib/node_modules/composer-cli/cli.js
> hashtable#2.0.2 install /root/.nvm/versions/node/v6.11.2/lib/node_modules/composer-cli/node_modules/hashtable
> node-gyp configure build
sh: 1: node-gyp: Permission denied
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.2 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! hashtable#2.0.2 install: `node-gyp configure build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the hashtable#2.0.2 install 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/2017-08-22T16_31_22_412Z-debug.log
So firstly you should not install Hyperledger Composer as 'root'. You need to read the docs here before you proceed https://hyperledger.github.io/composer/installing/development-tools.html
So fundamentally this is an npm issue (in that it causes problems for npm, when you npm install as 'root' or 'sudo' privileges for installing modules).
I suggest you create a non-root user in your Ubuntu system. Then log in as that user. Then install the pre-reqs using the supplied prereqs-ubuntu.sh script from the link above. Then follow the instructions, installing as your non-privileged user.
Normal route to fixing a non-root install npm issue, is one of these shown here https://docs.npmjs.com/getting-started/fixing-npm-permissions
When you install composer modules globally (eg. composer-cli) you should install using a designated, non-root user as mentioned. If there are issues (eg, on Ubuntu with permissions to write/update node directories located in system directories like /usr/local) - one solution (but see link earlier) is perform the npm install to a directory you have access to - rather than resort to root or superuser access, as this is not good practice. Here is what to do to set the npm prefix to a given directory, ...
"npm config set prefix /home/myuser/"
In this case, global binaries are placed in /home/myuser/bin which is in your PATH, and the modules are placed in /home/myuser/lib ...

Resources