gulp-favicons not working as part of gulp workflow - npm

I installed gulp-favicons as part of my gulp workflow but it crashes when this I use favicons = require('gulp-favicon'); even without running the task, it still produces the following error:
/Volumes/SK Repo 1.0/Projects/Stalin Kay/Web Development/htdocs/namcor/mockup/node_modules/gulp-favicons/index.js:3
(() => {
^
SyntaxError: Unexpected token )
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
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> (/Volumes/SK Repo 1.0/Projects/Stalin Kay/Web Development/htdocs/namcor/mockup/gulpfile.js:6:16)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)

Your Node.js version is too old. favicons uses arrow functions through out its code. Arrow functions have only been available since Node.js 4.x.
The requirement is even mentioned in the favicons README:
A Node.js module for generating favicons and their associated files. Originally built for Google's Web Starter Kit and Catalyst. Requires Node 4+.

Related

#google-cloud/express-oauth2-handlers not detecting required keys: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_CALLBACK_URL, GCP_PROJECT

I am trying to use #google-cloud/express-oauth2-handlers package in Firebase function to authorize user to then query google APIs.
I provided the required keys in client_secret.json file in root directory of my function/app as per npm instructions for this package, however it's still not detecting the required keys from the json file. Its throwing me below error.
firebase deploy --only functions
=== Deploying to 'doppelganger-appl'...
i deploying functions
i functions: ensuring necessary APIs are enabled...
✔ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
Error: Error occurred while parsing your function triggers.
Error: Missing required keys: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_CALLBACK_URL, GCP_PROJECT
at exports.Provider.Provider.required (/Users/<username>/my-doppelganger-app/functions/node_modules/nconf/lib/nconf/provider.js:364:11)
at Object.<anonymous> (/Users/<username>/my-doppelganger-app/functions/node_modules/#google-cloud/express-oauth2-handlers/config.js:53:7)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/Users/<username>/my-doppelganger-
app/functions/node_modules/#google-cloud/express-oauth2-
handlers/tokenStorage.js:17:16)

can't find module webpack.dev.js in cornerstone 2.0

Bigcommerce has released the new cornerstone theme version 2.0 and I use it for the store development but whenever I fire stencil start command, it gets the error and the error you can see below
module.js:538
throw err;
^
Error: Cannot find module './webpack.dev.js'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (E:\cornerstone\stencil.conf.js:2:17)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
This was an issue on our end, fixed in the 2.1 release. You can download Cornerstone 2.1 here:
https://github.com/bigcommerce/cornerstone/releases/tag/2.1.0
You'll also want to make sure you've updated Stencil CLI to version 1.15.0.

Error starting up React Native packager "Cannot find module metro-bundler"

I have a simple React Native project that works fine on the original machine I created it on, but when I clone the git repo on another machine and try to run the iOS project, I get this error when starting the packager:
module.js:471
throw err;
^
Error: Cannot find module 'metro-bundler/build/lib/formatBanner'
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> (.../node_modules/react-native/local-cli/server/checkNodeVersion.js:12:20)
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)
Process terminated. Press <enter> to close the window
The project is on GitHub here. I purposely didn't git ignore the node_modules folder because this project has some slight modifications to React Native itself. It seems if I delete node_modules and yarn install it resolves the issue but I'd like to have the GitHub repo in a state where you can clone and you don't need to run anything to set up dependencies.

Syntax error on webdriver-manager 10.2.9

Post from issue #170:
After updating to the newest version, I get the following error on running 'webdriver-manager' command.
C:\Users\(user)\AppData\Roaming\npm\node_modules\webdriver-manager\built\lib\cli\logger.js:66
info(...msgs) {
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\(user)\AppData\Roaming\npm\node_modules\we
bdriver-manager\built\lib\cli\index.js:8:10)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
Why is this happening? Version 10.2.9 requires node 6 and since it did not follow semantic versioning / caused a big problem, it was unpublished from npm and 10.2.10 has been published. To read more about 10.2.10, see the changelog.
If you have encountered this issue, please remove the node_module/webdriver-manager and do a fresh npm install.
You can downgrade webdriver version to 9.0 with this command:
npm install -g webdriver-manager#9.0

PhantomJS: "SyntaxError: Unexpected token =>"

Im currently having problems using phantomJS. Any suggestions?
acanyon$ babel-node source_parser.js http://url
/Users/.../node/node_modules/phantom/lib/index.js:23
return new Promise(resolve => resolve(new _phantom2.default(args, config)));
^^
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Module._extensions..js (module.js:478:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/acanyon/.nvm/versions/node/v0.12.4/lib/node_modules/babel-cli/node_modules/babel-register/lib/node.js:152:7)
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> (/Users/acanyon/fashionblog/node/source_parser.js:4:15)
at Module._compile (module.js:460:26)
Am I missing a shim for es6? (the remainder of the script is written in es5).
Phantomjs use ES5, not ES6 ;)
That's why it doesn't work as expected
This failure can be eliminated by using phantom versions prior to 2.0.0.
Notice that this is the phantom package and not the phantomjs package that is giving the failure.
if you want to use versions higher than 1.x. you will need to change your code from page.open(url, function(){}) to page.open(url).then(function(){}).
this is explained very well at phantom npm site. Which gives detailed examples of how to do it