-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin "googleAnalytics" of type "undefined" is not found, can not store config #919
Comments
Oh my Scully config file BTW contains the following: import { getSitemapPlugin } from '@gammastream/scully-plugin-sitemap';
import { ScullyConfig, setPluginConfig } from '@scullyio/scully';
import { GoogleAnalytics } from '@scullyio/scully-plugin-google-analytics';
import { MinifyHtml } from 'scully-plugin-minify-html';
import { getTocPlugin, TocConfig, TocPluginName } from 'scully-plugin-toc';
import MermaidAPI from 'mermaid/mermaidAPI';
import { getMermaidPlugin, MermaidPluginName } from 'scully-plugin-mermaid';
/**
* configuration for the markdown plugin
*/
setPluginConfig('md', { enableSyntaxHighlighting: true });
/**
* configuration for the mermaid plugin
* All params as defined here are valid:
* https://mermaid-js.github.io/mermaid/getting-started/Setup.html#mermaidapi-configuration-defaults
*/
const mermaidOptions: MermaidAPI.Config = {
theme: 'dark',
};
const MermaidPlugin = getMermaidPlugin();
setPluginConfig(MermaidPlugin, mermaidOptions);
/**
* configuration for the sitemap plugin
*/
const SitemapPlugin = getSitemapPlugin();
setPluginConfig(SitemapPlugin, {
urlPrefix: 'https://d-koppenhagen.de',
sitemapFilename: 'sitemap.xml',
changeFreq: 'monthly',
priority: [
'1.0',
'0.9',
'0.8',
'0.7',
'0.6',
'0.5',
'0.4',
'0.3',
'0.2',
'0.1',
'0.0',
],
ignoredRoutes: [
/*'/404'*/
],
routes: {
'/': {
changeFreq: 'weekly',
priority: '1.0',
sitemapFilename: 'sitemap.xml',
},
'/blog/:slug': {
changeFreq: 'weekly',
priority: '0.9',
sitemapFilename: 'sitemap-blog.xml',
},
'/projects/:slug': {
changeFreq: 'weekly',
priority: '0.8',
sitemapFilename: 'sitemap-blog.xml',
},
},
});
/**
* configuration for the TOC plugin
*/
const tocOptions: TocConfig = {
blogAreaSelector: '.blog-content',
insertSelector: '#toc',
level: ['h2', 'h3'],
trailingSlash: true,
scrollIntoViewOnClick: true,
};
const TocPlugin = getTocPlugin();
setPluginConfig(TocPlugin, tocOptions);
/**
* Gtag plugin config
*/
setPluginConfig(GoogleAnalytics, { globalSiteTag: 'UA-XXXXXXXXX-X' });
/**
* configure defualt postRenderers
*/
const defaultPostRenderers = [GoogleAnalytics, MinifyHtml];
/**
* configuration for HTML minification plugin
*/
/**
* the actual scully configuration
*/
export const config: ScullyConfig = {
projectRoot: './src',
projectName: 'd-koppenhagen-website',
outDir: './dist/static',
defaultPostRenderers,
routes: {
'/projects/:slug': {
type: 'contentFolder',
slug: {
folder: './projects',
},
postRenderers: [MermaidPluginName, ...defaultPostRenderers],
},
'/blog/:slug': {
type: 'contentFolder',
postRenderers: [
TocPluginName,
MermaidPluginName,
...defaultPostRenderers,
],
slug: {
folder: './blog',
},
},
},
}; |
@d-koppenhagen I did some related changes that are in the latest beta (.6), can you give that a try and see if it persists? |
If I change this in my + "@scullyio/scully": "1.0.0-beta.6",
- "@scullyio/scully": "1.0.0-beta.5", ... and run |
Ok, we will look futher into that, thanks for confirming |
@d-koppenhagen Do you continue with the same issue? |
Yep |
Tomorrow I will try to update all scully packages to the latest versions and then I can tell you if it still happens after updating to 1.0.0 |
Hey @jorgeucano , I juts update to scully version 1.0.0. Now the issue has gone away. I also notices that I added the GA plugin to the |
🐞 Bug report
When I will try to update some package in my Angular Scully project for my personal website (Repo here), the update is proceeded but there is a side effect that update also some part of the Scully plugin goolge analytics and the
package-lock.json
file is changed.Description
When I install all packages exactly as currently defined in the
packlage-lock.json
file, the scully plugin@scullyio/scully-plugin-google-analytics
works (You can reproduce this by runningnpm ci
on the console as it will not update the lock file and it will install the exact locked versions. ✅But when I install the packages running
npm i
, there is some update proceeded that causes the following error message on the console when runningnpm run scully
:After the
npm i
ran, thepackage-lock.json
file contains the following change that causes the update and in fact the error when running Scully:🔬 Minimal Reproduction
npm i
npm run scully:all
(Or separate: an Angular Build, the Scully build)package-lock.json
file is adjusted and the Google Analytics plugin doesn't work anymore💻Your Environment
Angular Version:
Scully Version:
🔥 Exception or Error
The text was updated successfully, but these errors were encountered: