mihai-vlc / sublime-jsfmt

jsfmt plugin for Sublime Text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find module 'jsfmt'. package.json file doesn't exist

damienleroux opened this issue · comments

Hello,

After installing this sublime plugin with package control, I got the error "module not found" in sublime Text 3:

Error: Cannot find module 'jsfmt'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (D:\WebFront\GitHubs\SublimeText-Dev-Env\Builds\Sublime Text Build 3083 x64\Data\Packages\jsfmt\jsfmt.js:4:13)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)

The problem seems to be there is not any package.json file in the repository Data\Packages\jsfmt from Sublime text folder or node module sub folders. Have you similar problems when importing jsfmt with sublime?

Loading the Zip file from github resolves the issue. However, I can't share my Package Control.sublime-settings with other developpers any more :(

It will help if anyone experienced the same problem with package loading from sublime Text?

PS:
I have this problem only with jsfmt package
I use node v4.2.1
I use sublime Text 3 64 bits official paid version

Thank you for you help

Just tested with the sublime text 3 portable version (3083) and it works as expected.

Maybe there was some issue with your internet connection while installing the plugin.
I suggest you delete the jsfmt folder and try to install again via package control and it should work.

You can double check that by checking the node_modules/ folder inside the jsfmt folder.

Actually I don't think it is coming from jsmft. I think the problem is coming from Window 7 too long path names.

When installing it, Sublime Text console show:

Exception in thread Thread-6:
Traceback (most recent call last):
  File "./threading.py", line 901, in _bootstrap_inner
  File "package_control.package_installer in D:\WebFront\GitHubs\SublimeText-Dev-Env\Builds\Sublime Text Build 3083 x64\Data\Installed Packages\Package Control.sublime-package", line 204, in run
  File "package_control.package_manager in D:\WebFront\GitHubs\SublimeText-Dev-Env\Builds\Sublime Text Build 3083 x64\Data\Installed Packages\Package Control.sublime-package", line 1206, in install_package
  File "./os.py", line 269, in makedirs
FileNotFoundError: [WinError 206] Nom de fichier ou extension trop long: 'D:\\WebFront\\GitHubs\\SublimeText-Dev-Env\\Builds\\Sublime Text Build 3083 x64\\Data\\Packages\\jsfmt\\node_modules\\jsfmt\\node_modules\\esformatter\\node_modules\\npm-run\\node_modules\\npm-path\\node_modules\\which\\node_modules\\is-absolute\\node_modules\\is-relative\\'

I moves the issue here: FileNotFoundError: WinError 206.
Thank you