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

Error: Cannot find module 'w3c-xmlserializer/lib/XMLSerializer' #143

Open
gtaillefer opened this issue Nov 11, 2022 · 1 comment
Open

Error: Cannot find module 'w3c-xmlserializer/lib/XMLSerializer' #143

gtaillefer opened this issue Nov 11, 2022 · 1 comment

Comments

@gtaillefer
Copy link

Since the last, post, I have managed to figure out most of the problems, but not all. I figured out that I needed to install many missing packages of which I could see were missing through npm outdated. I then downloaded all the missing packages, and then awaited to see if npm start would finally work, until it didn't. When I typed in npm start, it gave me this:

Error: Cannot find module 'w3c-xmlserializer/lib/XMLSerializer'

Require stack:

- /home2/wwiiarch/zotero/src/translation/translate.js

- /home2/wwiiarch/zotero/src/zotero.js

- /home2/wwiiarch/zotero/src/server.js

    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)

    at Function.Module._load (node:internal/modules/cjs/loader:833:27)

    at Module.require (node:internal/modules/cjs/loader:1057:19)

    at require (node:internal/modules/cjs/helpers:103:18)

    at Object.<anonymous> (/home2/wwiiarch/zotero/src/translation/translate.js:44:24)

    at Module._compile (node:internal/modules/cjs/loader:1155:14)

    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)

    at Module.load (node:internal/modules/cjs/loader:1033:32)

    at Function.Module._load (node:internal/modules/cjs/loader:868:12)

    at Module.require (node:internal/modules/cjs/loader:1057:19) {

  code: 'MODULE_NOT_FOUND',

  requireStack: [

    '/home2/wwiiarch/zotero/src/translation/translate.js',

    '/home2/wwiiarch/zotero/src/zotero.js',

    '/home2/wwiiarch/zotero/src/server.js'

  ]

}

I tried npm install w3c-xmlserializer/lib/XMLSerializer but it gives me the following error:

npm ERR! code ENOENT

npm ERR! syscall open

npm ERR! path /home2/wwiiarch/zotero/w3c-xmlserializer/lib/XMLSerializer/package.json

npm ERR! errno -2

npm ERR! enoent ENOENT: no such file or directory, open '/home2/wwiiarch/zotero/w3c-xmlserializer/lib/XMLSerializer/package.json'

npm ERR! enoent This is related to npm not being able to find a file.

npm ERR! enoent

npm ERR! A complete log of this run can be found in:

npm ERR!     /home2/wwiiarch/.npm/_logs/2022-11-11T02_13_24_366Z-debug-0.log

I checked in the w3c-xmlserializer/lib/folder to see if there was a XMLSerializer, but there wasn't, just the .js files in there. I have no idea how to fix this so if anyone can that'd be great

My specs now are:

CentOS 6

shared hosting bluehost cpanel

node v16.18.1

npm 8.19.2

Thanks

@gtaillefer
Copy link
Author

Ok so I think I partially fixed the problem. I found the tgz file for w3c-xmlseralizer 1.0.1: https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.0.1.tgz, and I had looked through and found the XMLSerializer.js, XMLSerializer-impl.js, and serialization files and put them into the lib directory. That then led me to do npm start again which prompted me with this:
/home2/wwiiarch/zotero/src/translation/translate.js:48
Object.defineProperty(Attr.interface.prototype, 'innerText', {
^

TypeError: Cannot read properties of undefined (reading 'prototype')
at Object. (/home2/wwiiarch/zotero/src/translation/translate.js:48:38)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object. (/home2/wwiiarch/zotero/src/zotero.js:105:20)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant