npm run dev issue (npm ERR! code ELIFECYCLE)

Error:-

> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

[webpack-cli] Error: Unknown option '--hide-modules'
[webpack-cli] Run 'webpack --help' to see available commands and options
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
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\Cotocus5\AppData\Roaming\npm-cache\_logs21-08-12T12_23_56_189Z-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\Cotocus5\AppData\Roaming\npm-cache\_logs21-08-12T12_23_56_273Z-debug.log

Solution:-

Step 1:- Run this command to verify cache

npm cache verify

Step 2:- Recheck your package.json and webpack.mix.js file it is correct or not.

Step 3:- Then Delete the Node Module file which is present in your project folder.

Step 4:- Run the Npm install command.

npm install

Step 5:- Then Run npm run dev command.

npm run dev
Tagged : / / / /

error in ./resources/assets/sass/app.scss

If you are getting this error (error in ./resources/assets/sass/app.scss) in Node module please follow some steps which is have mentioned in the following

Error:-

Many of you get this error when you did not change anything in app.scss, but when I run npm run watch I get the following errors:

 error  in ./resources/sass/app.scss                                                                      

Module build failed (from ./node_modules/sass-loader/lib/loader.js):                                      
Unsupported operation: Cannot extract a file path from a URI with a fragment component                    

@ ./resources/sass/app.scss 2:14-254                                                                     

    Asset      Size   Chunks             Chunk Names                                                     
/js/app.js  2.46 MiB  /js/app  [emitted]  /js/app                                                         

ERROR in ./resources/sass/app.scss                                                                        
Module build failed (from ./node_modules/css-loader/index.js):                                            
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):                    

undefined                                                                                                 
      ^                                                                                                  
      Join(null, "variables"): part 0 was null, but part 1 was not.                                       
@import 'variables';                                                                                      
        ^^^^^^^^^^^                                                                                       
  stdin 2:9  root stylesheet                                                                              
      in C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\resources\sass\app.scss (line 2, column 9)           
    at runLoaders (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\webpack\lib\NormalModule.js:30
    at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:364:11  
    at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:230:18  
    at context.callback (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\Loader
13)

Solution:-

The main issue which we have found that is related to dart-sass being used instead of node-sass with laravel

You have to just follow one step:-

Step 1:- You have to run this Command and all the things will solve .

npm install node-sass

Tagged : / / / / / / / / / /

‘cross-env’ is not recognized as an internal or external command, operable program or batch file.

Hey if you are getting some error like (‘cross-env’ is not recognized as an internal or external command, operable program or batch file.) in your Node please follow the steps which i have mentioned in following:-

You need to make cross-env working globally instead of having it in the project.

Step 1:- remove node_modules folder

Step 2:-  run this Command so that you cross-env work globally.

npm install --global cross-env

Step 3:- Remove “cross-env”: “5.0.1” from the devDependencies section of the package.json file. You may actually skip this step and keep package.json. If you’d want.

Step 4:- Then run this command.

npm install --no-bin-links

Step 5:- After this finally you can run your main command

npm run dev

Tagged : / / / / / / /

ERROR Failed to compile with 8 errors (Running ❯ npm run dev Failed to compile with 1 errors Unexpected token)

When you using “laravel 5.5” and changes in “resourse/asset” after that run commands “npm run dev” then showing this error.

Then run below commands –

Step-1

npm rebuild node-sass

Step -2

npm run dev

After that you project will be run.

Tagged : / / /

npm – Node Packaged Modules

Install a package
SYNOPSIS

npm install (with no args in a package dir)
npm install <tarball file>
npm install <tarball url>
npm install <folder>
npm install <name> [–save|–save-dev|–save-optional]
npm install <name>@<tag>
npm install <name>@<version>
npm install <name>@<version range>
npm i (with any of the previous argument usage)

This command installs a package, and any packages that it depends on. If the package has a shrinkwrap file, the installation of dependencies will be driven by that. See npm-shrinkwrap(1).

A package is:

a) a folder containing a program described by a package.json file
b) a gzipped tarball containing (a)
c) a url that resolves to (b)
d) a <name>@<version> that is published on the registry with (c)
e) a <name>@<tag> that points to (d)
f) a <name> that has a “latest” tag satisfying (e)
g) a <git remote url> that resolves to (b)

Even if you never publish your package, you can still get a lot of benefits of using npm if you just want to write a node program (a), and perhaps if you also want to be able to easily install it elsewhere after packing it up into a tarball (b).

 

More info …

https://npmjs.org/doc/install.html

Tagged : / / /

Npm module “grunt-open” not found. Is it installed?

scmuser created the topic: Npm module “grunt-open” not found. Is it installed?

I am getting following error…

grunt lite
[31m>> [39mLocal Npm module "grunt-open" not found. Is it installed?
Loading "nodestatic.js" tasks...[31mERROR[39m
[31m>> [39mError: Cannot find module 'node-static'
[31m>> [39mLocal Npm module "grunt-contrib-jshint" not found. Is it installed?
[31m>> [39mLocal Npm module "grunt-exec" not found. Is it installed?
[31m>> [39mLocal Npm module "grunt-contrib-copy" not found. Is it installed?
[31m>> [39mLocal Npm module "grunt-contrib-compass" not found. Is it installed?
[31m>> [39mLocal Npm module "grunt-contrib-watch" not found. Is it installed?
[31m>> [39mLocal Npm module "grunt-contrib-symlink" not found. Is it installed?
[31m>> [39mLocal Npm module "grunt-istanbul" not found. Is it installed?
[31m>> [39mLocal Npm module "intern" not found. Is it installed?
Loading "Gruntfile.js" tasks...[31mERROR[39m
[31m>> [39mError: Task "exec:installdeps" not found.
[33mWarning: Task "lite" not found. Use --force to continue.[39m

[31mAborted due to warnings.[39m
Tagged :

npm ERR! Error: No compatible version found: restful-client@’>=0.1.0-

rajeshkumar created the topic: npm ERR! Error: No compatible version found: restful-client@’>=0.1.0-
Error during npm install node-gitlab
rajesh@mahto:~$ npm install node-gitlab
npm http GET registry.npmjs.org/node-gitlab
npm http 304 registry.npmjs.org/node-gitlab
npm http GET registry.npmjs.org/debug
npm http GET registry.npmjs.org/restful-client
npm http 304 registry.npmjs.org/restful-client
npm ERR! error installing node-gitlab@0.2.1

npm ERR! Error: No compatible version found: restful-client@’>=0.1.0- <0.2.0-' npm ERR! No valid targets found. npm ERR! Perhaps not compatible with your version of node? npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10) npm ERR! at next_ (/usr/share/npm/lib/cache.js:438:17) npm ERR! at next (/usr/share/npm/lib/cache.js:415:44) npm ERR! at /usr/share/npm/lib/cache.js:408:5 npm ERR! at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7) npm ERR! at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7) npm ERR! You may report this log at: npm ERR! < bugs.debian.org/npm >
npm ERR! or use
npm ERR! reportbug –attach /home/rajesh/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-34-generic
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install” “node-gitlab”
npm ERR! cwd /home/rajesh
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: restful-client@’>=0.1.0- <0.2.0-' npm ERR! message No valid targets found. npm ERR! message Perhaps not compatible with your version of node? npm ERR! Error: EACCES, open 'npm-debug.log' npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! npm ERR! System Linux 3.8.0-34-generic npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "node-gitlab" npm ERR! cwd /home/rajesh npm ERR! node -v v0.6.19 npm ERR! npm -v 1.1.4 npm ERR! path npm-debug.log npm ERR! code EACCES npm ERR! message EACCES, open 'npm-debug.log' npm ERR! errno {} npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/rajesh/npm-debug.log npm not ok Regards, Rajesh Kumar Twitt me @ twitter.com/RajeshKumarIn

Tagged :

npm ERR! error installing node-gitlab@0.2.1

rajeshkumar created the topic: npm ERR! error installing node-gitlab@0.2.1
rajesh@mahto:~$ npm install node-gitlab
npm http GET registry.npmjs.org/node-gitlab
npm http 304 registry.npmjs.org/node-gitlab
npm http GET registry.npmjs.org/debug
npm http GET registry.npmjs.org/restful-client
npm http 304 registry.npmjs.org/restful-client
npm ERR! error installing node-gitlab@0.2.1

npm ERR! Error: No compatible version found: restful-client@’>=0.1.0- <0.2.0-' npm ERR! No valid targets found. npm ERR! Perhaps not compatible with your version of node? npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10) npm ERR! at next_ (/usr/share/npm/lib/cache.js:438:17) npm ERR! at next (/usr/share/npm/lib/cache.js:415:44) npm ERR! at /usr/share/npm/lib/cache.js:408:5 npm ERR! at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7) npm ERR! at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7) npm ERR! You may report this log at: npm ERR! < bugs.debian.org/npm >
npm ERR! or use
npm ERR! reportbug –attach /home/rajesh/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-34-generic
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install” “node-gitlab”
npm ERR! cwd /home/rajesh
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: restful-client@’>=0.1.0- <0.2.0-' npm ERR! message No valid targets found. npm ERR! message Perhaps not compatible with your version of node? npm ERR! Error: EACCES, open 'npm-debug.log' npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! npm ERR! System Linux 3.8.0-34-generic npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "node-gitlab" npm ERR! cwd /home/rajesh npm ERR! node -v v0.6.19 npm ERR! npm -v 1.1.4 npm ERR! path npm-debug.log npm ERR! code EACCES npm ERR! message EACCES, open 'npm-debug.log' npm ERR! errno {} npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/rajesh/npm-debug.log npm not ok rajesh@mahto:~$ npm -v 1.1.4 rajesh@mahto:~$ node -v The program 'node' can be found in the following packages: * node * nodejs-legacy Try: sudo apt-get install
rajesh@mahto:~$ sudo apt-get install node
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :