Open seognil opened 5 years ago
Is this still an issue with 3.0.0
?
@inxilpro hi there~
I just tested the v3.0.0, yes it seems still an issue…
notice the case /usr/local/lib/node_modules/@seognil-lab/la-starter-cli/node_modules/app-root-path/lib
there are two node_modules
, and the second one is target
seems to need a better way to decide, maybe could use some node.js runtime flag such as __dirname
🤔?
I meet the bug for my tool la-starter-cli
It seems the same as #28
the bug
In my case,
app-root-path
parse my tool'sappRoot
as/usr/local/lib/
on MacSo I got
/usr/local/lib/package.json
not found in my codeIt should be
/usr/local/lib/node_modules/@seognil-lab/la-starter-cli/
instead(install and run my tool
lcli -v
) (the bug should appear after reopen my code line 7 & 8 and comment line 10)the fix
I trace the code, it happens while there are multi
node_modules
in the path stringe.g.
/usr/local/lib/node_modules/@seognil-lab/la-starter-cli/node_modules/app-root-path/lib
I update the code, and test manually passed for both mac and window
It may fix #28 (Maybe #20 as well, not checked that too much)
remaining
But I'm not sure the origin logic,
And I know
app-root-path
is used by tons of libs So I also keep it as comment code,Please check it Thanks ~
(UPDATE) I notice that CI failed, so maybe we could seperate the use-case somehow?