Last active
February 29, 2024 07:40
-
-
Save deepak-cotocus/0238d919153cb7dce1cd0bdda41e2973 to your computer and use it in GitHub Desktop.
Revisions
-
deepak-cotocus revised this gist
Nov 10, 2020 . No changes.There are no files selected for viewing
-
deepak-cotocus revised this gist
Nov 5, 2020 . 1 changed file with 26 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ ## Error: # sh: 1: cross-env: Permission denied Ubuntu ### Introduction: This is because of permission issues with global installation of packages, which npm is being denied access. @@ -34,11 +34,34 @@ root@ip-172-31-20-213:/opt/lampp/htdocs/mhn-admin-ms# npm run prod ```  #### Solution ## Worked for me `chmod -R a+x node_modules` # First sudo chown -R $USER /usr/local And cd /path/of/project chmod -R a+x node_modules npm run watch # If not work npm rebuild npm run watch # If not work rm -Rf node_modules npm install npm run watch #### It worked for me.... -
deepak-cotocus revised this gist
Nov 5, 2020 . 1 changed file with 26 additions and 18 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,28 +1,36 @@ ## Error: sh: 1: cross-env: Permission denied Ubuntu ### Introduction: This is because of permission issues with global installation of packages, which npm is being denied access. I got this error in ubuntu machine while running a command `npm run prod` #### Error: ```php sh: 1: cross-env: Permission denied npm ERR! code ELIFECYCLE npm ERR! errno 126 npm ERR! @ production: `cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js` npm ERR! Exit status 126 npm ERR! npm ERR! Failed at the @ production 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/ubuntu/.npm/_logs/2020-11-05T09_35_05_202Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 126 npm ERR! @ prod: `npm run production` npm ERR! Exit status 126 npm ERR! npm ERR! Failed at the @ prod 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/ubuntu/.npm/_logs/2020-11-05T09_35_05_222Z-debug.log root@ip-172-31-20-213:/opt/lampp/htdocs/mhn-admin-ms# chmod -R a+x node_modules root@ip-172-31-20-213:/opt/lampp/htdocs/mhn-admin-ms# npm run prod ``` -
deepak-cotocus created this gist
Nov 5, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ ## Error: Vue packages version mismatch: - [email protected] - [email protected] ### Introduction: Though the version of the Vue-template-compiler is older than that of the Vue I just updated it to same version number as the Vue thus 2.6.11 In your case the number might not be same as mine so replace the version which shows in your error. #### Error: ```php ERROR in ./resources/assets/js/components/ExampleComponent.vue Module build failed: Error: Vue packages version mismatch: - [email protected] - [email protected] This may cause things to work incorrectly. Make sure to use the same version for both. If you are using vue-loader@>=10.0, simply update vue-template-compiler. If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest. ```  #### Solution `npm install [email protected] --save-dev` #### It worked for me.... ## Then run `npm run prod` and check evrything will work fine. ## Thanks ##