Skip to content
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

just installed, and TypeError: this._items[key].slice #133

Open
dimaslanjaka opened this issue Apr 8, 2022 · 0 comments
Open

just installed, and TypeError: this._items[key].slice #133

dimaslanjaka opened this issue Apr 8, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dimaslanjaka
Copy link

dimaslanjaka commented Apr 8, 2022

typescript:

import { create as createXML } from 'xmlbuilder2';
const sourceIndexXML = join(__dirname, 'views/sitemap.xml');
const sitemapIndexDoc = createXML(readFileSync(sourceIndexXML).toString());

xml:

<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
</sitemapindex>
<!-- XML Sitemap generated by Dimas Lanjaka -->

error occurs:

TypeError: this._items[key].slice is not a function
    at NamespacePrefixMap.copy (/media/dimaslanjaka/DATA/Repositories/gh-pages/node_modules/@oozcitak/dom/src/serializer/NamespacePrefixMap.ts:34:46)
    at ObjectWriter.BaseWriter._serializeElementNS (/media/dimaslanjaka/DATA/Repositories/gh-pages/node_modules/xmlbuilder2/src/writers/BaseWriter.ts:353:25)
    at ObjectWriter.BaseWriter._serializeNodeNS (/media/dimaslanjaka/DATA/Repositories/gh-pages/node_modules/xmlbuilder2/src/writers/BaseWriter.ts:224:14)
    at ObjectWriter.BaseWriter._serializeDocumentNS (/media/dimaslanjaka/DATA/Repositories/gh-pages/node_modules/xmlbuilder2/src/writers/BaseWriter.ts:838:12)
    at ObjectWriter.BaseWriter._serializeNodeNS (/media/dimaslanjaka/DATA/Repositories/gh-pages/node_modules/xmlbuilder2/src/writers/BaseWriter.ts:227:14)
    at ObjectWriter.BaseWriter.serializeNode (/media/dimaslanjaka/DATA/Repositories/gh-pages/node_modules/xmlbuilder2/src/writers/BaseWriter.ts:200:12)
    at ObjectWriter.serialize (/media/dimaslanjaka/DATA/Repositories/gh-pages/node_modules/xmlbuilder2/src/writers/ObjectWriter.ts:63:10)
    at XMLBuilderImpl._serialize (/media/dimaslanjaka/DATA/Repositories/gh-pages/node_modules/xmlbuilder2/src/builder/XMLBuilderImpl.ts:685:21)
    at XMLBuilderImpl.end (/media/dimaslanjaka/DATA/Repositories/gh-pages/node_modules/xmlbuilder2/src/builder/XMLBuilderImpl.ts:610:43)
    at sitemapindex (/media/dimaslanjaka/DATA/Repositories/gh-pages/src/gulp/tasks/sitemap/index.ts:44:65)
    at Object.<anonymous> (/media/dimaslanjaka/DATA/Repositories/gh-pages/src/gulp/tasks/sitemap/index.ts:52:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Module.m._compile (/media/dimaslanjaka/DATA/Repositories/gh-pages/node_modules/ts-node/src/index.ts:1455:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Object.require.extensions.<computed> [as .ts] (/media/dimaslanjaka/DATA/Repositories/gh-pages/node_modules/ts-node/src/index.ts:1458:12)
    at Module.load (node:internal/modules/cjs/loader:981:32)
@dimaslanjaka dimaslanjaka added the bug Something isn't working label Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants