No provider for framework jasmine - karma-runner

when i try to start karma i am getting error below:
C:\*>karma start karma.conf.js
C:\Users\*\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\injector.js:9
throw error('No provider for "' + name + '"!');
^
Error: No provider for "framework:jasmine"! (Resolving: framework:requirejs)
at error (C:\Users\*\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\injector.js:22:
at Object.parent.get (C:\Users\*\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\inj
at get (C:\Users\*\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\injector.js:54:19
at C:\Users\*\AppData\Roaming\npm\node_modules\karma\lib\server.js:31:14
at Array.forEach (native)
at start (C:\Users\XYZ\AppData\Roaming\npm\node_modules\karma\lib\server.js:30:21)
at invoke (C:\Users\XYZ\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\injector.js:75
at Object.exports.start (C:\Users\XYZ\AppData\Roaming\npm\node_modules\karma\lib\server.js:314:12
at Object.exports.run (C:\Users\XYZ\AppData\Roaming\npm\node_modules\karma\lib\cli.js:229:25)
at requireCliAndRun (C:\Users\*\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:24:16)
I already check if i have jasmine installed :
C:\*>npm jasmine --version
1.4.28
and Karma:
C:\*>karma --version
Karma version: 0.12.31
and followed few more tutorials but can't get out of this error, can someone please help me?

Looks that you need install the dependency to jasmine. Try :
npm install karma-jasmine
Also you need to add the config karma-jasmine in your array of plugins inside your config file:
// list of karma plugins
plugins: [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher',
'karma-requirejs',
'karma-jasmine'
]

Related

How to install diesel_cli with "cannot open input file libpq.lib" error?

I'm trying to install diesel_cli on my machine and have run into errors:
PS C:\> cargo install diesel_cli --no-default-features --features postgres
error: linking with `link.exe` failed: exit code: 1181
|
= note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\Users\\Owner\\AppData\\Local\\Temp\\rustc0hfMW4\\symbols.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.0.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.1.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.10.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.11.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.12.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.13.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.14.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.15.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.2.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.3.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.4.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.5.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.6.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.7.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.8.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.diesel.db6871c2-cgu.9.rcgu.o" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.3oc4g8xgeqr3xhil.rcgu.o" "/LIBPATH:C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps" "/LIBPATH:C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libdiffy-10116d1a46240765.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libansi_term-8ac785ba6dab3d54.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\liburl-085413cf155ebf4e.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libidna-e617760a188ae951.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libunicode_normalization-06cbce6ee463ab15.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libtinyvec-2700dcc8ca440a73.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libtinyvec_macros-5d0a0a5267ac9a02.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libunicode_bidi-3843cd708b9d5313.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libform_urlencoded-bc0ece478c9969ff.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libpercent_encoding-459d5072c4f6d412.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libdotenvy-d2dbc9637619d426.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libchrono-422b701f158856a2.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libnum_integer-2ae42b6e08c222a4.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libnum_traits-c406e65b13d6dcc2.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libserde_regex-766adf3a555ccd38.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libregex-f7212d89a6f67148.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libaho_corasick-5aae31e8a72badf2.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libmemchr-a65d51fb2ae7accd.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libregex_syntax-5a1f463340fb2444.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libheck-f97b054e733bf2b0.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libclap_complete-007464ddcbb6d7e3.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libdiesel_migrations-3bdc5b636ff49b93.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libmigrations_internals-057e468a6688077a.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libtoml-761527a98d007259.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libdiesel-3216c6f0692e5464.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libitoa-275f0509159cbce5.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libbyteorder-c046fcd7b7138a94.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libpq_sys-634b13f8c11ea75f.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libclap-5c0a23e17fdd1cb3.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libatty-8c20fbe3a5f86f4a.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libstrsim-3f67262decc03c33.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libtermcolor-2d2dc574ed6f0782.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libwinapi_util-24c50559c3aed431.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libwinapi-e00b279ba3acd452.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libtextwrap-a3c74de9cda85b72.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libclap_lex-ed195b3d1e438c9f.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libos_str_bytes-ee2d8aeaa96a27b2.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libindexmap-8887803fd6fdd584.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libhashbrown-f256a9213b6968e2.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libbitflags-64893d0f4e23f5eb.rlib" "C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\libserde-40c8cc7197730aad.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-2e5a4fde2066d4f2.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-a4e0bcf1e60e2edb.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-2d0f8274a5407337.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_detect-dc68e6f9c2985e79.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-8bfb058d1afb96bd.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libminiz_oxide-fe2fe9acb704bcf5.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libadler-4e20259a2e504a61.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-ba723ab4066a2120.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-f9ca31420ed0b54e.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-753c3a361b9abd1c.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-22cf67e3a026b780.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-4bacd70ae093a213.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-2823e3c97f1346a4.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-2e984cab75d078cb.rlib" "C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-c045e84c0343a063.rlib" "libpq.lib" "advapi32.lib" "cfgmgr32.lib" "gdi32.lib" "kernel32.lib" "msimg32.lib" "ole32.lib" "opengl32.lib" "runtimeobject.lib" "shell32.lib" "user32.lib" "winspool.lib" "advapi32.lib" "userenv.lib" "kernel32.lib" "ws2_32.lib" "bcrypt.lib" "msvcrt.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:C:\\Users\\Owner\\AppData\\Local\\Temp\\cargo-installUiMeci\\release\\deps\\diesel-e71e8d3863826309.exe" "/OPT:REF,ICF" "/DEBUG" "/NATVIS:C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\Owner\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
= note: LINK : fatal error LNK1181: cannot open input file 'libpq.lib'
error: could not compile `diesel_cli` due to previous error
error: failed to compile `diesel_cli v2.0.0`, intermediate artifacts can be found at `C:\Users\Owner\AppData\Local\Temp\cargo-installUiMeci`
I've installed Rust successfully. I have Postgres 13 running locally and in Docker as well. But I'm still stuck and can't figure out what to do next. Any help is greatly appreciated!
Please confirm that you have the Postgres development libraries installed:
sudo apt install libpq-dev
For more help:
https://github.com/diesel-rs/diesel/issues/2026
https://github.com/diesel-rs/diesel/issues/2465
Maybe If you download this solves your problem
https://www.postgresql.org/download/windows/
On windows, after installation of postgresql define environment variable which points to client libs. PQ_LIB_DIR=C:\Program Files\PostgreSQL\13\lib
It's works for me!
sudo apt install libpq-dev

'gatsby-source-graphql' causes load plugins error quoting 'gatsby/graphql'

I have a working Gatsby install that I've been adding to, however, in trying to build in some graphQL build-time data fetching, I've run into an issue that causes error when running npm start (gatsby develop) or gatsby build.
I installed gatsby-source-graphql as described here:
https://www.npmjs.com/package/gatsby-source-graphql
And I included it in my gatsby-config.js like this:
module.exports = {
// Optional
siteMetadata: {
title: `Title from siteMetadata`,
},
plugins: [
{
resolve: `gatsby-plugin-manifest`,
options: {
name: "Project Template",
short_name: "PT",
start_url: "/",
background_color: "#6b37bf",
theme_color: "#6b37bf",
// Enables "Add to Homescreen" prompt and disables browser UI (including back button)
// see https://developers.google.com/web/fundamentals/web-app-manifest/#display
display: "standalone",
icon: "src/images/icon.png", // This path is relative to the root of the site.
// An optional attribute which provides support for CORS check.
// If you do not provide a crossOrigin option, it will skip CORS for manifest.
// Any invalid keyword or empty string defaults to `anonymous`
crossOrigin: `use-credentials`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
// GraphQL APIs for use during build-time.
// https://www.npmjs.com/package/gatsby-source-graphql
//////////////////////////////////////////////////////
{
resolve: "gatsby-source-graphql",
options: {
// Arbitrary name for the remote schema Query type
typeName: "SpaceX",
// Field under which the remote schema will be accessible. You'll use this in your Gatsby query
fieldName: "spaceX",
// Url to query from
url: "https://api.spacex.land/graphql/",
},
},
// {
// resolve: "gatsby-source-graphql",
// options: {
// // Arbitrary name for the remote schema Query type
// typeName: "SWAPI",
// // Field under which the remote schema will be accessible. You'll use this in your Gatsby query
// fieldName: "swapi",
// // Url to query from
// url: "https://swapi-graphql.netlify.app/.netlify/functions/index",
// },
// },
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
`gatsby-plugin-react-helmet`,
`gatsby-theme-material-ui`,
{
resolve: `gatsby-plugin-nprogress`,
options: {
// Setting a color is optional.
color: `tomato`,
// Disable the loading spinner.
showSpinner: false,
},
},
`gatsby-plugin-transition-link`,
`gatsby-plugin-layout`, // Trial and error showed this needs to be last (But that doesn't mean it will always work in the dev environment, try npm run clean or if that fails - test in build)
],
}
But it produces this error:
Error in "/Users//Documents/projects/project/node_modules/gatsby-source-graphql/gatsby-node.js":
Cannot find module 'gatsby/graphql'
Error: Cannot find module 'gatsby/graphql'
- loader.js:636 Function.Module._resolveFilename
internal/modules/cjs/loader.js:636:15
- loader.js:562 Function.Module._load
internal/modules/cjs/loader.js:562:25
- loader.js:692 Module.require
internal/modules/cjs/loader.js:692:17
- v8-compile-cache.js:159 require
[client]/[v8-compile-cache]/v8-compile-cache.js:159:20
- gatsby-node.js:8 Object.<anonymous>
[tbwa-project-template]/[gatsby-source-graphql]/gatsby-node.js:8:5
- v8-compile-cache.js:178 Module._compile
[client]/[v8-compile-cache]/v8-compile-cache.js:178:30
- loader.js:789 Object.Module._extensions..js
internal/modules/cjs/loader.js:789:10
- loader.js:653 Module.load
internal/modules/cjs/loader.js:653:32
- loader.js:593 tryModuleLoad
internal/modules/cjs/loader.js:593:12
- loader.js:585 Function.Module._load
internal/modules/cjs/loader.js:585:3
- loader.js:692 Module.require
internal/modules/cjs/loader.js:692:17
- v8-compile-cache.js:159 require
[client]/[v8-compile-cache]/v8-compile-cache.js:159:20
- resolve-module-exports.ts:197 resolveModuleExports
[client]/[gatsby]/src/bootstrap/resolve-module-exports.ts:197:26
- validate.ts:348 forEach
[client]/[gatsby]/src/bootstrap/load-plugins/validate.ts:348:31
- Array.forEach
- validate.ts:340 collatePluginAPIs
[client]/[gatsby]/src/bootstrap/load-plugins/validate.ts:340:20
not finished load plugins - 0.727s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project-template#1.0.0 start: `gatsby develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project-template#1.0.0 start 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! /Users/_logs/2021-02-04T00_31_34_070Z-debug.log
What I've tried:
I've tried two different gatsby-source-graphql definitions in the config (only ever one at a time), but both produce the error. THe second one (commented out above) is taken directly from The github page example and the Gatsby example.
I've tried changing the order of the plugins (i've tried every position) but still get the error.
If I comment any and all gatsby-source-graphql sections in the config, it doesn't produce the error.
If I comment out all plugins except one of the gatsby-source-graphql sections, I still get the exact same error.
I've also tried removing the node_modules folder, running npm run clean, and then npm install again with no change.
I've tried DanceParty's solution described in the link below as well with no change:
https://github.com/gatsbyjs/gatsby/issues/8249
I've tried running npm update and npm install npm#latest -g and saw no change.
My environment report using gatsby info --clipboard is:
System:
OS: macOS 10.15.7
CPU: (4) x64 Intel(R) Core(TM) i5-6287U CPU # 3.10GHz
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.23.1 - /usr/local/bin/node
npm: 6.14.10 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 88.0.4324.96
Firefox: 85.0
Safari: 14.0.2
npmPackages:
gatsby: ^2.26.1 => 2.32.0
gatsby-image: ^2.10.0 => 2.11.0
gatsby-plugin-layout: ^1.9.0 => 1.10.0
gatsby-plugin-manifest: ^2.11.0 => 2.12.0
gatsby-plugin-material-ui: ^2.1.10 => 2.1.10
gatsby-plugin-nprogress: ^2.9.0 => 2.10.0
gatsby-plugin-react-helmet: ^3.8.0 => 3.10.0
gatsby-plugin-sharp: ^2.13.0 => 2.14.0
gatsby-plugin-transition-link: ^1.20.5 => 1.20.5
gatsby-source-filesystem: ^2.10.0 => 2.11.0
gatsby-theme-material-ui: ^1.0.13 => 1.0.13
gatsby-transformer-sharp: ^2.11.0 => 2.12.0
npmGlobalPackages:
gatsby-cli: 2.19.0
Any ideas?
I started creating a minimal reproduction and adding everything back one by one, but decided to play more with my first setup for a little...and I'm glad I did.
Here's what caused the issue:
This Gatsby install is part of a Project Template we use which includes backend code, front-end, pipeline deployment scripts, etc.
The structure is similar to:
ProjectTemplate folder
client folder
server folder
other folders
The Gatsby install lives in the client folder but occasionally I need to go into the root folder to do certain things.
So what happened!?
I accidentally installed gatsby-source-graphql into the root folder instead of the client folder. That's all.
I should have picked this up when I ran gatsby info --clipboard as it's clearly not listed as a dependency.

Issue with installing Facebook CTF

I am trying to install Facebook CTF from https://github.com/facebook/fbctf
Following the instructions, I execute ./extra/provision.sh -m prod -s $PWD
All goes well, until it gets to the section where it runs grunt. It's hitting this code in a javascript file
const proto = Object.defineProperties(() => {}, {
...styles,
level: {
enumerable: true,
get() {
return this._generator.level;
},
set(level) {
this._generator.level = level;
}
}
});
It's balking at the ellipsis in front of styles.
It's giving this error.
...styles,
^^^
SyntaxError: Unexpected token ...
Has anyone run into this error when install fbctf or can spot a Javascript error? Thanks for your help
I'm using the Quick Setup instructions and ran into a similar issue.
I resolved by it upgrading my nodejs version using npm in the instructions below.
https://phoenixnap.com/kb/update-node-js-version
Note: I did the nodejs installation on command line before running the install command.

Unable to configure Log4js in Protractor

Can anyone please suggest how to configure log4js in protractor. Unable to proper documentation with clear steps to configure. I want a log file to be created with the all the information.
You can use log4js-protractor-appender. log4js-protractor-appender overrides log4js' default console appender. Just install it as a dependency
$ npm install log4js-protractor-appender --save
Then you can load it as any file appender. For example:
{
"appenders": [
{
"type": "log4js-protractor-appender-file"
}
]
}
Then you can print log statements like below
logger.info('Navigating to /');
browser.get('/');
element(by.css('#someText')).getText().then(function (text) {
logger.info('Displayed text is: ', text);
});
logger.info('Should be displayed last');
You can refer the following thread as well
log4j-protractor-appender
Hope this helps

GruntJS "bus error grunt watch"

I'm having an error with GruntJS when I try to run a grunt watch.
It works fine, until there is a change in the file it is
watching, then, it looks something like this:
Running "watch" task
Waiting...[1] 2464 bus error grunt watch
The number 2464 changes. It seems to be the port that grunt is watching on? But, I'm not sure. Here is my Gruntfile:
module.exports = function (grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
style: 'compact'
},
files: {
'css/style.css': 'sass/style.scss',
}
}
},
watch: {
files: 'sass/style.scss',
tasks: ['sass']
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['sass']);
};
Thanks in advance for all the help!
Do you use Osx maverick?
checkout this: https://github.com/gruntjs/grunt-contrib-watch/issues/204
You need to upgrade node.js to 0.10.22 version:
# Check your version of Node.js. v0.10.20 will still be broken
node –v
# clean your node cache
sudo npm cache clean –f
# install node binary manager ’n’
sudo npm install -g n
# use said ’n’ manager to install latest stable version
sudo n stable
source: http://stephentvedt.com/blog/2013/11/16/grunt-js-watch-bus-error/
Invalid syntax in sass files can also cause grunt or gulp to exit with a bus error. If you've already updated node and reinstalled modules without any success, try running sass --watch <sass glob> and see if there are any errors (import loops can be safely ignored as the cause).