bem-archive / bem-tools

Toolkit to work with files based on BEM methodology
http://bem.info/tools/bem/
MIT License
395 stars 72 forks source link

v2 MODULE_NOT_FOUND #606

Closed ilyar closed 8 years ago

ilyar commented 8 years ago
{ [Error: Cannot find module '.'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module 'bem-tools-make/cli'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module 'bem-tools-init/cli'] code: 'MODULE_NOT_FOUND' }
$ npm i -g bem/bem-tools#WIP # global installation
$ npm i -g bem-incubator/bem-tools-init # global installation
$ bem
{ [Error: Cannot find module '.'] code: 'MODULE_NOT_FOUND' }
Tools to work with files written using the BEM methodology.
See https://bem.info for more info.

Usage:
  bem [OPTIONS] [ARGS]

Options:
  -h, --help : Help
  -v, --version : Version

$ npm init
$ npm i bem-incubator/bem-tools-make # local installation
$ bem
{ [Error: Cannot find module '.'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module 'bem-tools-make/cli'] code: 'MODULE_NOT_FOUND' }
Tools to work with files written using the BEM methodology.
See https://bem.info for more info.

Usage:
  bem [OPTIONS] [ARGS]

Options:
  -h, --help : Help
  -v, --version : Version

npm i -g bem/bem-tools#WIP

$ npm i -g bem/bem-tools#WIP # local installation
$ ./node_modules/.bin/bem 
{ [Error: Cannot find module 'bem-tools-init/cli'] code: 'MODULE_NOT_FOUND' }
Tools to work with files written using the BEM methodology.
See https://bem.info for more info.

Usage:
  bem COMMAND [OPTIONS] [ARGS]
  bem [OPTIONS] [ARGS]

Commands:
  make : Make

Options:
  -h, --help : Help
  -v, --version : Version
qfox commented 8 years ago

О, спасибо. Тоже хотел начать пытаться использовать, но боялся что на такое наткнусь ;-)

/cc @tadatuta @vithar

tadatuta commented 8 years ago

@ilyar оно все еще воспроизводится? я повторил

$ npm i -g bem/bem-tools#WIP # global installation
$ npm i -g bem-incubator/bem-tools-init # global installation
$ bem

и у меня все ок.

ilyar commented 8 years ago

@tadatuta

$ node -v && npm -v
v0.12.9
2.14.9

$ rm -fr test && mkdir test && cd $_
$ npm remove -g bem bem-tools-init
$ npm cache clear
$ npm i -g bem/bem-tools#WIP # global installation
$ npm i -g bem-incubator/bem-tools-init # global installation
$ bem
{ [Error: Cannot find module '.'] code: 'MODULE_NOT_FOUND' }
Tools to work with files written using the BEM methodology.
See https://bem.info for more info.

Usage:
  bem [OPTIONS] [ARGS]

Options:
  -h, --help : Help
  -v, --version : Version
tadatuta commented 8 years ago

ага, на 0.12 воспроизводится. видимо что-то из ES6 осталось. пару минут, поправлю...

tadatuta commented 8 years ago

Внезапно оказалось, что 0.12 не умеет require('.'). Исправлено в https://github.com/bem-incubator/bem-tools-init/blob/master/cli.js

tadatuta commented 8 years ago

Спасибо за репорт!