hugofy-vscode icon indicating copy to clipboard operation
hugofy-vscode copied to clipboard

Error: Cannot find module 'vscode'

Open LinuxSuRen opened this issue 5 years ago • 4 comments

When I follow the vsc-extension-quickstart.md, got some exception at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (/Users/mac/IdeaProjects/Github/akmittal/hugofy-vscode/src/extension.ts:4:1) at Module._compile (module.js:649:14) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) Waiting for the debugger to disconnect...

Does anyone know what's going on? Thanks.

LinuxSuRen avatar Dec 31 '18 11:12 LinuxSuRen

I have the same problem. I thought I'd try my hand at fixing the issue that it does not find hugo on windows, but I cannot get it to run from source. This is probably due to an idiotic error but difficult to solve.

The error you get is the following as the quote above is not complete:

Error: Cannot find module 'vscode'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (c:\Users\dk\Source\vscode\hugofy-vscode\out\src\extension.js:5:16)
    at Module._compile (module.js:650:14)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
Waiting for the debugger to disconnect...

It does not help to run npm install or to clean the npm cache. There is something else wrong in the project setup but I am to new to this setup to find it.

gazorg avatar Jan 20 '19 16:01 gazorg

I don't know how to fixes this. So just create a project for it. https://github.com/LinuxSuRen/smart-hugo

LinuxSuRen avatar Jan 21 '19 01:01 LinuxSuRen

@LinuxSuRen it has been 3 years and the author did not published a new version. I've forked and submitted a updated version here, with some bugs fixed: https://marketplace.visualstudio.com/items?itemName=ttys3.hugofy

ttys3 avatar May 03 '20 15:05 ttys3

@ttys3 Good to hear this.

LinuxSuRen avatar May 05 '20 01:05 LinuxSuRen