-
Notifications
You must be signed in to change notification settings - Fork 73
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: get-installed-path: module not found "@xmldom/xmldom" in path /home/abc/npm_temp/node_modules/apigeelint/node_modules/@xmldom/xmldom #471
Comments
what version of apigeelint are you using? |
we are using 2.56.1 in 2.56.1 it is the same as 2.56.0 The path.resolve should have an extra slash. |
I tested it using
and
Both worked for me. My versions:
|
ok. We are running in maven using ${user.home}/npm_temp/node_modules/apigeelint/cli.js run -s ./apiproxy -f tap.js |
Still not sure why thats happening, probably something to do with your file system? can you run it as a npm run command instead? For example, include the the scripts section to your package.json
And then call |
I've run the following on 2.55.3 and it works and on the latest it is not working. c:\project-workspace>npm install. with 2.55.3 it works fine. with the latest version I see the following error. node version npm version any help is appreciated. |
@DinoChiesa - can you look into this? Could this be due to #464 ?? |
@brian-corcoran1 can you try this? If this corrects your problem we can merge #474 |
this is what I am seeing now. C:\project-workspace>node C:\project-workspace\node_modules\apigeelint\cli.js run -s ./apiproxy -f tap.js Error: cannot find node_modules I am running on windows and found how to resolve it. The const found = ["../../", "../../../"].reduce(r, null); statement has the slashes at the end that is not resolving to the directory on windows. If I remove the end slash in the found statement it resolves to the path to xmldom, const found = ["../..", "../../.."].reduce(r, null); |
ok -as you can tell I did not test this on a windows machine. (same edit as you suggested) |
ok I'm just going to submit this PR, on the assumption that it's going to work. |
released in v2.57.0 |
Hey, @ssvaidyanathan and/or @DinoChiesa, I was trying to update apigeelint in a project for my day job and noticed that a very similar issue still persists in v2.57.0. We're using yarn, if that helps in any way. I tried the following combinations of yarn and node versions, to no avail:
In all cases, this is the output I get:
Looking at the directory structure, it seems the Slightly tangential, I was looking through the patch in #474 to see if the original solution could help me find a way to solve our problem, and I noticed that the patch adds a |
when running apigeelint cli.js run -s ./apiproxy -f tap.js seeing the error mentioned in the title. If I look in the lib/package/myUtils.js the following code looks to be the issue
const path = require("path"),
myhome = path.resolve(__dirname, "../../"),
if I change the path.resolve to path.resolve(__dirname, "../../../..") with 3 slashes it works.
The text was updated successfully, but these errors were encountered: