Puppeteer install fails on Ubuntu 18.04 LTS - puppeteer

I am trying to install puppeteer on a VPS hosted by Linode (Ubuntu 18.04 LTS).
I run npm install puppeteer and run into the following error:
unhandledPromiseRejectionWarning: /home/kekearif/meh/node_modules/puppeteer/lib/cjs/puppeteer/install.js:138
catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at download (/home/kekearif/meh/node_modules/puppeteer/install.js:35:7)
(node:11036) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11036) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
meh#1.0.0 /home/kekearif/meh
└── puppeteer#5.3.0 extraneous
npm WARN ws#7.3.1 requires a peer of bufferutil#^4.0.1 but none was installed.
npm WARN ws#7.3.1 requires a peer of utf-8-validate#^5.0.2 but none was installed.
npm WARN meh#1.0.0 No description
npm WARN meh#1.0.0 No repository field.
Any ideas how to fix this?

Related

Error while compiling css and js files using gulp

I am getting the below mentioned error and I am not able to figure out how to handle it. Versions of gulp, node and npm are mentioned below. I don't know if it is node's version mismatch with that of gulp or something else but so far any help would be much appreciated.
gulp -v
CLI Version: 2.3.0
Local Version: 3.9.1
node -v
v6.10.3
npm -v
3.10.10
ERROR
C:\xampp\htdocs\ecommerce\node_modules\engine.io\build\server.js:173
async handshake(transportName, req, closeConnection) {
^^^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\xampp\htdocs\ecommerce\node_modules\engine.io\build\engine.io.js:5:18)
Support for async functions was added in Node 7.6.0.
You are using Node 6.10.3.
You need to upgrade.
The oldest version of Node which is still supported (although only for a matter of weeks!) is version 12.
Upgrade to at least version 16.14.2 (the current long term support release).
install version 8.11.1 and run :
npm install
npm install gulp bower --global
npm install node-sass#latest
npm uninstall laravel-elixir
npm uninstall session
npm install --save laravel-elixir
npm install --save session
gulp
after that it will work

Can not install Polymer CLI 3

I am trying to upgrade to Polymer 3 from Polymer 2. My environment follows:
Debian Stretch
npm version 6.1.0
command run with root account: npm install -g polymer-cli
Any idea? Thank you in advance!
/usr/bin/polymer -> /usr/lib/node_modules/polymer-cli/bin/polymer.js
> wd#1.6.2 install /usr/lib/node_modules/polymer-cli/node_modules/wd
> node scripts/build-browser-scripts
/usr/lib/node_modules/polymer-cli/node_modules/mkdirp/index.js:90
throw err0;
^
Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/polymer-cli/node_modules/wd/build'
at Object.fs.mkdirSync (fs.js:902:18)
at sync (/usr/lib/node_modules/polymer-cli/node_modules/mkdirp/index.js:71:13)
at Object.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/wd/scripts/build-browser-scripts.js:6:1)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
at startup (internal/bootstrap/node.js:201:19)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.3 (node_modules/polymer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
This seems to be caused by npm issue #17346.
The current workaround is to call npm install -g polymer-cli with the --unsafe-perm flag until a new fix is released.

Error When Executing Gulp on Mac OS X

Having trouble running Gulp, and not quite sure what the issue is here. I've Googled the error, yet all forums that have come up haven't fixed my issue.
Here's the relevant install info:
npm -v
2.11.3
node -v
v0.12.7
node -p process.versions
{ http_parser: '2.3',
node: '0.12.7',
v8: '3.28.71.19',
uv: '1.6.1',
zlib: '1.2.8',
modules: '14',
openssl: '1.0.1p' }
node -p process.platform
darwin
node -p process.arch
x64
And the error I'm getting when executing Gulp:
Error: `libsass` bindings not found in /PATH/TO/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-14/binding.node. Try reinstalling `node-sass`?
at Object.sass.getBinaryPath (/PATH/TO/node_modules/gulp-sass/node_modules/node-sass/lib/extensions.js:148:11)
at Object.<anonymous> (/PATH/TO/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:16:36)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/PATH/TO/node_modules/gulp-sass/index.js:163:21)
at Module._compile (module.js:460:26)
Kind of lost on what to do next...
Try running npm rebuild node-sass after npm install node-sass.

Gulp doesn't work

I installed gulp on my machine, but when i try to compile my project i have this error:
Error: Cannot find module 'del'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Applications/MAMP/htdocs/project/gulpfile.js:6:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
I dont understand the error and i dont know how solve.
Someone can help me?
Thanks
This error message indicates that the module 'del' cannot be found. It seems that the 'del' package is not installed or not properly configured in your project.
Try installing the 'del' package by running the following command in your terminal:
npm install del --save-dev
If you have already installed 'del' package and still getting this error, try uninstalling and then reinstalling it.
npm uninstall del
npm install del --save-dev
Also make sure that you have the latest version of npm and node installed on your machine.
npm install -g npm
After installing or reinstalling 'del' package, you can try running the gulp command again and see if the error persists.

cannot install mysql using npm in nodejs

i have tried following commands,mysql module does not get added to node_module folder,also the code using mysql throw an error.
Your environment has been set up for using Node.js 0.8.3 (ia32) and NPM
C:\Users\Work>npm install mysql
npm http GET https://registry.npmjs.org/mysql
npm http 304 https://registry.npmjs.org/mysql
npm http GET https://registry.npmjs.org/hashish/0.0.4
npm http 304 https://registry.npmjs.org/hashish/0.0.4
npm http GET https://registry.npmjs.org/traverse
npm http 304 https://registry.npmjs.org/traverse
mysql#0.9.6 node_modules\mysql
└── hashish#0.0.4 (traverse#0.6.3)
C:\Users\Work>npm install mysql#2.0.0-alpha3
npm http GET https://registry.npmjs.org/mysql/2.0.0-alpha3
npm http 304 https://registry.npmjs.org/mysql/2.0.0-alpha3
npm http GET https://registry.npmjs.org/require-all/0.0.3
npm http 304 https://registry.npmjs.org/require-all/0.0.3
mysql#2.0.0-alpha3 node_modules\mysql
└── require-all#0.0.3
C:\Users\Work>node D:\nodejs\sqlwrite.js
module.js:340
throw err;
^
Error: Cannot find module 'mysql'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (D:\nodejs\sqlwrite.js:1:74)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
C:\Users\Work>
i have entered the commands as shown on github.
You should add the path (where node modules are installed) to system variable. Or navigate to default system path for NodeJS modules and install NodeJS modules. This is path for my system:
C:\Users\[user-name]\AppData\Roaming\npm\node_modules