Closed edxu96 closed 2 years ago
I have the same problem :(
@qwertysk could you please provide your system information? Are you also using Windows?
I don't think it's related to nvm
because the file is required by the Node engine included in VS Code.
It might be related to the file path.
@edxu96 does your path contains spaces or any specials characters?
I can reproduce it and the fix is quite trivial 😄
Sorry I am late. I am also using Windows and my path does not contains spaces nor special characters. Regards.
does your path contains spaces or any specials characters?
@Mogztter No. Sorry, I'm late.
BTW, to build from source doesn't work in Windows. Furthermore, in order to see if you have resolved, I tried to build in WSL. I can install the resulted vsix
in Windows, but the extension cannot be used. The error message is command 'asciidoc.showPreviewToSide' not found
.
@edxu96 try this workaround:
@edxu96 Could you please join the community chat to share what exactly did not work when you tried to build from source in Windows? https://chat.asciidoctor.org/
Furthermore, in order to see if you have resolved, I tried to build in WSL. I can install the resulted vsix in Windows, but the extension cannot be used. The error message is command 'asciidoc.showPreviewToSide' not found.
Indeed, I can reproduce this issue! The dependency js-yaml
was incorrectly declared as a development dependency that's why the extension is not working properly:
[2022-09-07 12:10:25.190] [exthost] [error] Error: Cannot find module 'js-yaml'
Require stack:
- /home/guillaume/.vscode/extensions/asciidoctor.asciidoctor-vscode-3.0.1-dev/dist/src/features/antora/antoraSupport.js
- /home/guillaume/.vscode/extensions/asciidoctor.asciidoctor-vscode-3.0.1-dev/dist/src/extension.js
- /usr/share/code/resources/app/out/vs/loader.js
- /usr/share/code/resources/app/out/bootstrap-amd.js
- /usr/share/code/resources/app/out/bootstrap-fork.js
at Module._resolveFilename (node:internal/modules/cjs/loader:987:15)
at Module._load (node:internal/modules/cjs/loader:832:27)
As mentioned by @qwertysk since the fix is a one-liner you can modify the installed extension directly. Having said that we should definitely fix the build.
@edxu96 try this workaround:
@qwertysk Thanks for the tip. I have tried several times, but it doesn't work in my case. Probably because I have messed up with that part.
As @Mogztter suggested, I have continuted my question to zulipchat
.
Same issue here with MS Code 1.84 under Linux and "AsciiDoc 3.1.7" extension. Long ago this worked.
@roseswe please open a new issue with a reproduction case
Thanks for the effort. I'm trying to use an
Asciidoctor.js
extension (likeasciidoctor-emoji
), but it says the module cannot be found.Description
The version of
asciidoctor-vscode
is 3.0.1.It might be because I use
nvm
for the workspace.System Information
To Reproduce
Steps to reproduce the issue:
My settings are:
The error message is: