I am trying to install puppeteer globally on macOS (Mojave) 10.14.3
First failure (in sudo su mode): npm install -g puppeteer
> puppeteer#1.12.2 install /usr/local/lib/node_modules/puppeteer
> node install.js
ERROR: Failed to download Chromium r624492! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/puppeteer/.local-chromium'
-- ASYNC --
at BrowserFetcher.<anonymous> (/usr/local/lib/node_modules/puppeteer/lib/helper.js:108:27)
at Object.<anonymous> (/usr/local/lib/node_modules/puppeteer/install.js:64:16)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/usr/local/lib/node_modules/puppeteer/.local-chromium' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer#1.12.2 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer#1.12.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! /var/root/.npm/_logs/2019-02-27T14_04_04_609Z-debug.log
Second failure: I successfully installed manually Chromium from https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/635943/ and then (in sudo su mode):
npm get | grep PUPPETEER
PUPPETEER_EXECUTABLE_PATH = "/Applications/Chromium.app/Contents/MacOS/Chromium"
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = true
PUPPETEER_EXECUTABLE_PATH = "/Applications/Chromium.app/Contents/MacOS/Chromium"
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = true
npm install -g puppeteer
> puppeteer#1.12.2 install /usr/local/lib/node_modules/puppeteer
> node install.js
ERROR: Failed to download Chromium r624492! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/puppeteer/.local-chromium'
-- ASYNC --
at BrowserFetcher.<anonymous> (/usr/local/lib/node_modules/puppeteer/lib/helper.js:108:27)
at Object.<anonymous> (/usr/local/lib/node_modules/puppeteer/install.js:64:16)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/usr/local/lib/node_modules/puppeteer/.local-chromium' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer#1.12.2 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer#1.12.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! /var/root/.npm/_logs/2019-02-27T14_07_19_001Z-debug.log
What am I doing wrong here?
Try with it:
npm config set user 0
npm config set unsafe-perm true
npm install -g puppeteer
Option unsafe-perm:
Set to true to suppress the UID/GID switching when running package
scripts. If set explicitly to false, then installing as a non-root
user will fail.
If npm was invoked with root privileges, then it will change the uid
to the user account or uid specified by the user config, which
defaults to nobody. Set the unsafe-perm flag to run scripts with root
privileges.
This was working fine for me a matter of days ago, but am not getting exactly the same error
Related
npm ERR! code 1
npm ERR! path C:\Users\JPawar\CYPRESS_AUTOMATION\page-un-article\node_modules\cypress
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node index.js --exec install
npm ERR! node:internal/modules/cjs/loader:936
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'strip-final-newline'
npm ERR! Require stack:
npm ERR! - C:\Users\JPawar\CYPRESS_AUTOMATION\page-un-article\node_modules\cypress\node_modules\execa\index.js
npm ERR! - C:\Users\JPawar\CYPRESS_AUTOMATION\page-un-article\node_modules\cypress\lib\util.js
npm ERR! - C:\Users\JPawar\CYPRESS_AUTOMATION\page-un-article\node_modules\cypress\index.js
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR! at require (node:internal/modules/cjs/helpers:102:18)
npm ERR! at Object.<anonymous> (C:\Users\JPawar\CYPRESS_AUTOMATION\page-un-article\node_modules\cypress\node_modules\execa\index.js:5:27)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1101:14)
npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1005:19) {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: [
npm ERR! 'C:\\Users\\JPawar\\CYPRESS_AUTOMATION\\page-un-article\\node_modules\\cypress\\node_modules\\execa\\index.js',
npm ERR! 'C:\\Users\\JPawar\\CYPRESS_AUTOMATION\\page-un-article\\node_modules\\cypress\\lib\\util.js',
npm ERR! 'C:\\Users\\JPawar\\CYPRESS_AUTOMATION\\page-un-article\\node_modules\\cypress\\index.js'
npm ERR! ]
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JPawar\AppData\Local\npm-cache\_logs\2022-01-08T07_20_10_984Z-debug.log
I did something and it work to me.
go to C:\Users\username\node_modules with file explorer in windows.
delete everything is here
re run your install command. for example "npm i -D electron#latest"
hello i'm beginner at Laravel. i'm trying to learn Laravel Authentication but i'm facing errors.
I'm facing errors in my Laravel learning project where I'm facing npm run dev problem in Laravel Authentication how can i solve this problem?
here are the steps i've took
I've installed node.js and set the Authentication by
composer require laravel/ui
php artisan ui vue --auth
after that
npm install --verbose
here Is my CMD Command
PS C:\xampp\htdocs\myapp> npm run dev
Here is the errors I'm Facing:
> # dev C:\xampp\htdocs\myapp
> npm run development
> # development C:\xampp\htdocs\myapp
> mix
[webpack-cli] Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin'
Require stack:
- C:\xampp\htdocs\myapp\node_modules\vue-loader\lib\plugin-webpack5.js
- C:\xampp\htdocs\myapp\node_modules\vue-loader\lib\plugin.js
- C:\xampp\htdocs\myapp\node_modules\vue-loader\lib\index.js
- C:\xampp\htdocs\myapp\node_modules\laravel-mix\src\components\Vue.js
- C:\xampp\htdocs\myapp\node_modules\laravel-mix\src\components\ComponentRegistrar.js
- C:\xampp\htdocs\myapp\node_modules\laravel-mix\src\Mix.js
- C:\xampp\htdocs\myapp\node_modules\laravel-mix\setup\webpack.config.js
- C:\xampp\htdocs\myapp\node_modules\webpack-cli\lib\webpack-cli.js
- C:\xampp\htdocs\myapp\node_modules\webpack-cli\lib\bootstrap.js
- C:\xampp\htdocs\myapp\node_modules\webpack-cli\bin\cli.js
- C:\xampp\htdocs\myapp\node_modules\webpack\bin\webpack.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (C:\xampp\htdocs\myapp\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object.<anonymous> (C:\xampp\htdocs\myapp\node_modules\vue-loader\lib\plugin-webpack5.js:6:42)
at Module._compile (C:\xampp\htdocs\myapp\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\xampp\\htdocs\\myapp\\node_modules\\vue-loader\\lib\\plugin-webpack5.js',
'C:\\xampp\\htdocs\\myapp\\node_modules\\vue-loader\\lib\\plugin.js',
'C:\\xampp\\htdocs\\myapp\\node_modules\\vue-loader\\lib\\index.js',
'C:\\xampp\\htdocs\\myapp\\node_modules\\laravel-mix\\src\\components\\Vue.js',
'C:\\xampp\\htdocs\\myapp\\node_modules\\laravel-mix\\src\\components\\ComponentRegistrar.js',
'C:\\xampp\\htdocs\\myapp\\node_modules\\laravel-mix\\src\\Mix.js',
'C:\\xampp\\htdocs\\myapp\\node_modules\\laravel-mix\\setup\\webpack.config.js',
'C:\\xampp\\htdocs\\myapp\\node_modules\\webpack-cli\\lib\\webpack-cli.js',
'C:\\xampp\\htdocs\\myapp\\node_modules\\webpack-cli\\lib\\bootstrap.js',
'C:\\xampp\\htdocs\\myapp\\node_modules\\webpack-cli\\bin\\cli.js',
'C:\\xampp\\htdocs\\myapp\\node_modules\\webpack\\bin\\webpack.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # development: `mix`
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\ASUS\AppData\Roaming\npm-cache\_logs\2021-09-21T05_52_12_933Z-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\ASUS\AppData\Roaming\npm-cache\_logs\2021-09-21T05_52_12_972Z-debug.log
I am trying to deploy on heroku but I keep getting this .env error, but it is present in my project. Could someone give some direction as to what I can do to resolve this or any possible mistakes I made?
tmp/build_057816491291ab18684f7791472a55f4/config/env.js:7
throw Error(’.env not found, please copy sample.env to .env.’);
^
Error: .env not found, please copy sample.env to .env.
at Object. (/tmp/build_057816491291ab18684f7791472a55f4/config/env.js:7:11)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (/tmp/build_057816491291ab18684f7791472a55f4/tools/scripts/build/ensure-env.js:5:13)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1158:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! #freecodecamp/freecodecamp#0.0.1 ensure-env: cross-env DEBUG=fcc:* node ./tools/scripts/build/ensure-env.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the #freecodecamp/freecodecamp#0.0.1 ensure-env 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! /tmp/npmcache.kGGVT/_logs/2020-07-09T14_23_29_322Z-debug.log
ERROR: “ensure-env” exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! #freecodecamp/freecodecamp#0.0.1 build: npm-run-all ensure-env -p build:*
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the #freecodecamp/freecodecamp#0.0.1 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! /tmp/npmcache.kGGVT/_logs/2020-07-09T14_23_29_344Z-debug.log
you will not be able to use a .env file on heroku.You need to either use the heroku cli to set this
heroku config:set DBHOST=database_host_here
heroku config:set DBPASS=database_pass_here
or you can use the heroku dashboard settings tab to edit config vars
reference: https://devcenter.heroku.com/articles/config-vars
I am trying to run following command: npm run dev. However, it is giving an error as
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
module.js:471
throw err;
^
Error: Cannot find module 'lodash._baseclone'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/var/www/html/korsall-clean/node_modules/node-
notifier/node_modules/lodash.clonedeep/index.js:9:17)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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 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/ubuntu/.npm/_logs/2017-06-07T10_34_11_411Z-
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/ubuntu/.npm/_logs/2017-06-07T10_34_11_426Z-
debug.log
I have removed node_modules folder and re-installed it, but still it is giving same error.
Please guide me wher
There is a very similar error that I found in this thread: https://github.com/meteor/meteor/issues/7221#issuecomment-226595754
There is a comment there that says the problem is related to the windows max path limitation of 260 characters. I tend to believe this is correct since I know I don't have the problem on my device that has the long paths enabled in windows - https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
I'm getting the crash on my build server which is running another version of windows.
Try this npm i --save lodash._baseclone
Installing parse-server onto my dev box, I'm getting the following error when working through
/z/www/parse-server-example/node_modules/parse-server/lib/index.js:335
throw err;
^
TypeError: ParseServer.createLiveQueryServer is not a function
at Object.<anonymous> (/z/www/parse-server-example/index.js:55:13)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:142:18)
at node.js:939:3
npm ERR! Linux 3.13.0-83-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v5.9.0
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! parse-server-example#1.4.0 start: `node index.js`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the parse-server-example#1.4.0 start script 'node index.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 parse-server-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs parse-server-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls parse-server-example
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /z/www/parse-server-example/npm-debug.log
I get the same error whether running nodejs index.js or npm start. I'm following the digital ocean instructions for parse-server installation. Has anyone ran into this issue or have any advice?
I used this guide and it works great, I prefer to use the parse-server and not the example version, all the environment variables are now supported so I would suggest to just follow the tutorial (U will not create a index.js but you will do it with ecosystem.json)
There was an issue with a commit the same day I was trying this, works fine now.