bem / project-stub Goto Github PK
View Code? Open in Web Editor NEWdeps
deps
Скачиваю проект по инструкции.
Делаю блок из примера.
block('link')(
tag()('span'),
match(this.ctx.url)(
tag()('a'),
attrs()({ href: this.ctx.url }),
mode('reset')(
attrs()({ href: undefined })
)
)
)
в index.bemjson.js подключаю
{
block: 'link',
content: 'block test',
url: "test"
},
в make.js
process.env.BEMHTML_ENV = 'development';
Пробую собрать / запустить чере bem server
bem make -m clean && bem make
Выдает ошибку
TypeError: Cannot read property 'url' of undefined
Будем сразу показывать, что можно получить, если собрать проект.
HTTP error 500
Error: Cannot find module 'esprima'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/libs/bem-core/node_modules/bemhtml-compat/lib/compat.js:2:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/libs/bem-core/.bem/techs/bemhtml.js:4:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at exports.getTechClass (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/lib/tech/index.js:18:48)
at exports.createTech (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/lib/tech/index.js:58:21)
at exports.Level.INHERIT.createTech (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/lib/level.js:154:16)
at exports.Level.INHERIT.getTech (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/lib/level.js:141:43)
at registry.decl.__constructor (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/lib/nodes/build.js:51:39)
at res.(anonymous function) [as __constructor] (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/node_modules/inherit/lib/inherit.js:28:32)
at res [as __self] (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/node_modules/inherit/lib/inherit.js:48:43)
at registry.decl.setBemBuildNode (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/lib/nodes/bundle.js:195:25)
at registry.decl.createDefaultTechNode (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/lib/nodes/bundle.js:320:21)
at registry.decl.createTechNode (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/lib/nodes/bundle.js:84:24)
at null. (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/lib/nodes/bundle.js:62:37)
at Array.map (native)
at null. (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/lib/nodes/bundle.js:61:29)
at makePromise.apply (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/node_modules/q/q.js:927:26)
at makePromise.promise.promiseDispatch (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/node_modules/q/q.js:634:41)
at Object._onImmediate (/home/w495/work/projects/yandex/yabs/bem/stub/project-stub/node_modules/bem/node_modules/q/q.js:1245:25)
at processImmediate [as _immediateCallback] (timers.js:330:15)
It can be fixed with npm install esprima
Decide if it should be implemented in main branch after i18n
support appear in bem-core v2
or make it as an option in https://github.com/bem/generator-bem-stub
Upon npm install
step i got following error:
npm http 404 https://www.npmjs.org/bem-tools-autoprefixer/0.0.3
npm ERR! registry error parsing json
npm ERR! SyntaxError: Unexpected token <
npm ERR! <!DOCTYPE html>
npm ERR! <html lang="en">
npm ERR! <head>
npm ERR! <meta charset="utf-8">
npm ERR! <title>Not Found</title>
npm ERR! <link rel="canonical" href="https://www.npmjs.org/bem-tools-autoprefixer/0.0.3">
npm ERR! <link type="text/css" rel="stylesheet" media="all"
npm ERR! href="/static/css/normalize.css">
npm ERR! <link type="text/css" rel="stylesheet" media="all"
[lots of markup here]
npm i bem-tools-autoprefixer
alone gives the same result.
Я использую сборку бандлов через API так, как это сделано у @tenorok
в демо https://github.com/tenorok/dynamic-bem-site/blob/bemup/bundle.js
После обновления моего make.js для использования нового синтаксиса библиотек у меня стала возникать ошибка при повторном запросе на сборку.
/var/www/tlmpls-guest/node_modules/bem/node_modules/coa/node_modules/q/q.js:1327
throw error;
^
RangeError: Maximum call stack size exceeded
Пришлось закомментировать
//environ.extendMake(MAKE);
и вернуться в старому синтаксису библиотек.
Travis-ci is very helpfull for test bem make
.
You can find exmple travis config: https://github.com/pahaz/bem-project-stub-with-bh-and-enb/blob/master/.travis.yml
внезапно не ставятся зависимости в текущей bem-core
node 0.10.26
npm 1.4.10
"Simple BEM project exampe" - example.
npm http GET https://packages:5984/colors/-/colors-0.3.0.tgz
Соответственно, получаем fetch failed
When I run make, I receive the following error:
sudo make
npm http GET https://registry.npmjs.org/bem
npm http 304 https://registry.npmjs.org/bem
npm http GET https://registry.npmjs.org/qq/0.3.5
npm http GET https://registry.npmjs.org/q-fs/0.1.33
npm http GET https://registry.npmjs.org/q-http/0.1.16
npm http GET https://registry.npmjs.org/mime/1.2.7
npm http GET https://registry.npmjs.org/apw/0.3.9
npm http GET https://registry.npmjs.org/underscore/1.3.3
npm http GET https://registry.npmjs.org/inherit/1.0.4
npm http GET https://registry.npmjs.org/xjst/0.2.21
npm http GET https://registry.npmjs.org/ometajs/2.1.10
npm http GET https://registry.npmjs.org/winston/0.6.2
npm http GET https://registry.npmjs.org/borschik/0.0.18
npm http GET https://registry.npmjs.org/memorystream/0.2.0
npm http GET https://registry.npmjs.org/csso/1.3.5
npm http GET https://registry.npmjs.org/uglify-js/1.3.4
npm http GET https://registry.npmjs.org/dom-js/0.0.9
npm http GET https://registry.npmjs.org/chai/1.0.4
npm http GET https://registry.npmjs.org/coffee-script/1.4.0
npm http GET https://registry.npmjs.org/eyes/0.1.8
npm http GET https://registry.npmjs.org/mocha/1.3.2
npm http GET https://registry.npmjs.org/coverjs/0.0.9-alpha
npm http GET https://registry.npmjs.org/mocha-coverjs/0.0.1
npm http GET https://registry.npmjs.org/coa/0.3.8
npm http GET https://registry.npmjs.org/q/0.8.10
npm http 304 https://registry.npmjs.org/qq/0.3.5
npm http 304 https://registry.npmjs.org/q-http/0.1.16
npm http 304 https://registry.npmjs.org/q-fs/0.1.33
npm http 304 https://registry.npmjs.org/mime/1.2.7
npm http 304 https://registry.npmjs.org/apw/0.3.9
npm http 304 https://registry.npmjs.org/underscore/1.3.3
npm http 304 https://registry.npmjs.org/inherit/1.0.4
npm http 304 https://registry.npmjs.org/xjst/0.2.21
npm http 304 https://registry.npmjs.org/ometajs/2.1.10
npm http 304 https://registry.npmjs.org/winston/0.6.2
npm http 304 https://registry.npmjs.org/borschik/0.0.18
npm http 304 https://registry.npmjs.org/memorystream/0.2.0
npm http 304 https://registry.npmjs.org/csso/1.3.5
npm http 304 https://registry.npmjs.org/uglify-js/1.3.4
npm http 304 https://registry.npmjs.org/dom-js/0.0.9
npm http 304 https://registry.npmjs.org/chai/1.0.4
npm http 304 https://registry.npmjs.org/coffee-script/1.4.0
npm http 304 https://registry.npmjs.org/eyes/0.1.8
npm http 304 https://registry.npmjs.org/mocha/1.3.2
npm http 304 https://registry.npmjs.org/coverjs/0.0.9-alpha
npm http 304 https://registry.npmjs.org/mocha-coverjs/0.0.1
npm WARN package.json [email protected] No README.md file found!
npm http 304 https://registry.npmjs.org/coa/0.3.8
npm http 304 https://registry.npmjs.org/q/0.8.10
npm WARN engine [email protected]: wanted: {"node":"0.6 | 0.8"} (current: {"node":"v0.8.14","npm":"1.1.65"})
npm http GET https://registry.npmjs.org/jade/0.27.7
npm http GET https://registry.npmjs.org/mocha/1.0.3
npm http GET https://registry.npmjs.org/sax/0.4.2
npm http GET https://registry.npmjs.org/q-io/0.0.17
npm http GET https://registry.npmjs.org/q/0.8.4
npm http GET https://registry.npmjs.org/esprima/0.9.9
npm http GET https://registry.npmjs.org/escodegen/0.0.14
npm http GET https://registry.npmjs.org/cssp/1.0.6
npm http GET https://registry.npmjs.org/fs-boot/0.0.8
npm http GET https://registry.npmjs.org/node.extend/1.0.0
npm http GET https://registry.npmjs.org/async/0.1.22
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http GET https://registry.npmjs.org/q/0.7.2
npm http GET https://registry.npmjs.org/uglify-js/1.1.1
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/growl/1.5.1
npm http GET https://registry.npmjs.org/prime/0.0.5-alpha
npm http GET https://registry.npmjs.org/cycle/1.0.0
npm http GET https://registry.npmjs.org/jade/0.26.3
npm http GET https://registry.npmjs.org/Supersonic/0.0.6
npm http GET https://registry.npmjs.org/pkginfo/0.2.3
npm http GET https://registry.npmjs.org/diff/1.0.2
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/request/2.9.203
npm http GET https://registry.npmjs.org/debug/0.7.0
npm http GET https://registry.npmjs.org/stack-trace/0.0.6
npm http GET https://registry.npmjs.org/coa/0.3.1
npm http 304 https://registry.npmjs.org/q-io/0.0.17
npm http 304 https://registry.npmjs.org/sax/0.4.2
npm http 304 https://registry.npmjs.org/jade/0.27.7
npm http 304 https://registry.npmjs.org/mocha/1.0.3
npm http 304 https://registry.npmjs.org/q/0.8.4
npm WARN engine [email protected]: wanted: {"node":">= 0.4.x < 0.8.0"} (current: {"node":"v0.8.14","npm":"1.1.65"})
npm http GET https://registry.npmjs.org/mkdirp/0.3.4
npm http GET https://registry.npmjs.org/commander/0.5.2
npm http GET https://registry.npmjs.org/jade/0.20.3
npm http 304 https://registry.npmjs.org/esprima/0.9.9
npm http 304 https://registry.npmjs.org/escodegen/0.0.14
npm http 304 https://registry.npmjs.org/cssp/1.0.6
npm http 304 https://registry.npmjs.org/fs-boot/0.0.8
npm http 304 https://registry.npmjs.org/node.extend/1.0.0
npm http 304 https://registry.npmjs.org/async/0.1.22
npm http 304 https://registry.npmjs.org/colors/0.6.0-1
npm http 304 https://registry.npmjs.org/q/0.7.2
npm http 304 https://registry.npmjs.org/uglify-js/1.1.1
npm http 304 https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/event-queue/0.2.0
npm http 304 https://registry.npmjs.org/growl/1.5.1
npm http 304 https://registry.npmjs.org/prime/0.0.5-alpha
npm WARN package.json [email protected] No README.md file found!
npm http 304 https://registry.npmjs.org/jade/0.26.3
npm http 304 https://registry.npmjs.org/cycle/1.0.0
npm WARN package.json [email protected] No README.md file found!
npm WARN package.json [email protected] No README.md file found!
npm http 304 https://registry.npmjs.org/Supersonic/0.0.6
npm http 304 https://registry.npmjs.org/pkginfo/0.2.3
npm http 304 https://registry.npmjs.org/diff/1.0.2
npm http 304 https://registry.npmjs.org/request/2.9.203
npm http 304 https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/esprima/1.0.2
npm http GET https://registry.npmjs.org/source-map/0.1.7
npm http 304 https://registry.npmjs.org/debug/0.7.0
npm http 304 https://registry.npmjs.org/stack-trace/0.0.6
npm http 304 https://registry.npmjs.org/commander/0.5.2
npm http 304 https://registry.npmjs.org/mkdirp/0.3.4
npm http 304 https://registry.npmjs.org/coa/0.3.1
npm WARN engine [email protected]: wanted: {"node":">=0.4.0 <0.7.0"} (current: {"node":"v0.8.14","npm":"1.1.65"})
npm http GET https://registry.npmjs.org/ometajs/3.1.15
npm http 304 https://registry.npmjs.org/source-map/0.1.7
npm http 304 https://registry.npmjs.org/event-queue/0.2.0
npm http 304 https://registry.npmjs.org/jade/0.20.3
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm WARN package.json [email protected] No README.md file found!
npm http 304 https://registry.npmjs.org/esprima/1.0.2
npm http GET https://registry.npmjs.org/q/0.8.10
npm http GET https://registry.npmjs.org/event-queue/0.2.0
npm http GET https://registry.npmjs.org/mkdirp/0.3.4
npm http GET https://registry.npmjs.org/amdefine/0.0.4
npm http 304 https://registry.npmjs.org/ometajs/3.1.15
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/q/0.8.10
npm http 304 https://registry.npmjs.org/event-queue/0.2.0
npm http 304 https://registry.npmjs.org/amdefine/0.0.4
npm http 304 https://registry.npmjs.org/mkdirp/0.3.4
npm WARN prefer global [email protected] should be installed with -g
[email protected] node_modules/bem
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected])
17:43:03.613 - info: bem 0.5.20
17:43:03.615 - info: Project root is '/var/www/projects/bem/project-stub'
17:43:03.672 - info: Graph:
== root
all
build
bem-bl
desktop.blocks*
bem-bl
desktop.bundles*
bem-bl
desktop.blocks*
bem-bl
events.js:71
throw arguments[1]; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:769:11)
at Server._listen2 (net.js:909:14)
at listen (net.js:936:10)
at Server.listen (net.js:985:5)
at exports.Server.self.listen (/var/www/projects/bem/project-stub/node_modules/bem/node_modules/q-http/q-http.js:131:23)
at exports.Server.INHERIT.startServer (/var/www/projects/bem/project-stub/node_modules/bem/lib/base-server.js:87:36)
at exports.Server.INHERIT.startServer (/var/www/projects/bem/project-stub/node_modules/bem/lib/server.js:18:28)
at keys.forEach.res.(anonymous function) [as startServer] (/var/www/projects/bem/project-stub/node_modules/bem/node_modules/inherit/lib/inherit.js:28:32)
at exports.Server.INHERIT.startServers (/var/www/projects/bem/project-stub/node_modules/bem/lib/base-server.js:64:45)
at _fulfilled (/var/www/projects/bem/project-stub/node_modules/bem/node_modules/q/q.js:927:32)
at resolvedValue.promiseSend.done (/var/www/projects/bem/project-stub/node_modules/bem/node_modules/q/q.js:953:30)
at makePromise.promise.promiseSend (/var/www/projects/bem/project-stub/node_modules/bem/node_modules/q/q.js:587:13)
at pending (/var/www/projects/bem/project-stub/node_modules/bem/node_modules/q/q.js:488:35)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
make: *** [server] Ошибка 1
What's the problem?
I've tryed to run local bem server (which ./node_modules/bem/bin/bem) with export PATH=./node_modules/.bin:$PATH, but I saw "bash: bem: command not found". Maybe it must be absolute path like:
export PATH=/FULL_PATH_TO_PROJECT_DIR/node_modules/bem/bin/:$PATH
I've tryed and it has worked for me.
Что нужно сделать чтобы использовать BH шаблоны? Где лежит технология для ENB?
i-bem should be loaded before the code which uses it. In order to guarantee it use mustDeps
В файле b-search.deps.js не хватает block: 'b-link' ? Если использовать в этом проекте для b-search:
under: {
block: 'b-link',
url: '/',
content: 'Advanced search'
}
b-link поставляется как div с классами, но без атрибутов href, title и пр.
Или я должен как-то доопределять эти зависимости на уровне проекта?
make
command runs server. make
should build a project but make server
is to tun a server
Want to go deeper with BEM, and started working locally. After cloning the project-stub repo and 'npm i' - tried to create a new level 'pages' in the project root. And got this:
~/D/b/project-hello ❯❯❯ bem create level pages
TypeError: Cannot read property 'res' of undefined
at /Users/dab/Documents/BEM/project-hello/node_modules/bem/lib/commands/create/level.js:107:31
at Array.map (native)
at Cmd.<anonymous> (/Users/dab/Documents/BEM/project-hello/node_modules/bem/lib/commands/create/level.js:81:37)
at /Users/dab/Documents/BEM/project-hello/node_modules/bem/node_modules/coa/lib/cmd.js:429:22
at /Users/dab/Documents/BEM/project-hello/node_modules/bem/node_modules/coa/node_modules/q/q.js:388:35
at node.js:901:3
From previous event:
at Cmd.exports.Cmd.Cmd._do (/Users/dab/Documents/BEM/project-hello/node_modules/bem/node_modules/coa/lib/cmd.js:424:14)
at Cmd.exports.Cmd.Cmd.do (/Users/dab/Documents/BEM/project-hello/node_modules/bem/node_modules/coa/lib/cmd.js:471:17)
at Cmd.exports.Cmd.Cmd.run (/Users/dab/Documents/BEM/project-hello/node_modules/bem/node_modules/coa/lib/cmd.js:459:22)
at Object.<anonymous> (/Users/dab/Documents/BEM/project-hello/node_modules/bem/bin/bem:6:23)
at node.js:901:3
Any ideas? I can run 'bem server' and go throught the pages successfully.
Thanks.
Так, как большинство технологий используемых в данном проекте нет у большинства разработчиков, которые хотят попробовать на зубок, просто нет. То нужно учитывать это.
Я дал задание двум бойцам попробовать этот проект и они столкнулись с проблемами, которые решались только так:
git clone https://github.com/bem/project-stub.git -b bem-core my-bem-project
cd my-bem-project
npm install
npm install stylus -g
npm install bower -g
npm install travis-ci # not necessarily
npm install q-io
cd libs/bem-components && npm install && bower install
cd ../bem-core && && npm install && bower install
bem server -p 8080 -v debug
@arikon Подсказал, что с установкой должен помочь bower-npm-install
пакет. Но его нет в основных зависимостях. И людям не ведомо за него.
We need to have an ability to compile all project's stuff to some kind "release" format, so it could be send to developers with no BEM workflow.
Ok, cloned the repo, then
npm i
then
bem create -b test -l desktop.bundles
and when I go to the http://localhost:8080/desktop.bundles/ i got a 500 error.
*** HTTP error: 500, SyntaxError: Unexpected token {
at exports.techMixin.getCreateResult (/Users/dab/Documents/BEM/project-h/node_modules/bem/lib/techs/v2/bemdecl.js.js:18:37)
at /Users/dab/Documents/BEM/project-h/node_modules/bem/lib/tech/v2.js:120:41
at Array.map (native)
at exports.Tech.INHERIT.getCreateResults (/Users/dab/Documents/BEM/project-h/node_modules/bem/lib/tech/v2.js:119:47)
at exports.Tech.INHERIT.create (/Users/dab/Documents/BEM/project-h/node_modules/bem/lib/tech/v2.js:90:57)
at exports.Tech.INHERIT.createByDecl (/Users/dab/Documents/BEM/project-h/node_modules/bem/lib/tech/v2.js:77:25)
at /Users/dab/Documents/BEM/project-h/node_modules/bem/lib/commands/create.js:101:51
at Array.map (native)
at /Users/dab/Documents/BEM/project-h/node_modules/bem/lib/commands/create.js:100:40
at Array.map (native)
at Cmd.<anonymous> (/Users/dab/Documents/BEM/project-h/node_modules/bem/lib/commands/create.js:99:32)
at /Users/dab/Documents/BEM/project-h/node_modules/bem/node_modules/coa/lib/cmd.js:429:22
at /Users/dab/Documents/BEM/project-h/node_modules/bem/node_modules/coa/node_modules/q/q.js:388:35
From previous event:
at Cmd.exports.Cmd.Cmd._do (/Users/dab/Documents/BEM/project-h/node_modules/bem/node_modules/coa/lib/cmd.js:424:14)
at /Users/dab/Documents/BEM/project-h/node_modules/bem/node_modules/coa/lib/cmd.js:510:22
at /Users/dab/Documents/BEM/project-h/node_modules/bem/node_modules/coa/node_modules/q/q.js:893:30
at /Users/dab/Documents/BEM/project-h/node_modules/bem/node_modules/coa/node_modules/q/q.js:360:35
Я описал его тут bem-archive/bem-environ#11
Hello I am trying to start a BEM project and project-stub for the first time. I followed all of the directions did an npm install, a bower install, and then it gave me an error about not being able to find the module 'ym'. So I did an npm install ym and then it gave me the connot find module 'stylus' error. I did an npm install stylus, it does it without errors, but when i try to load the project it still gives me that same error. I have no clue where to go from here please help!
При попытке собрать и запустить тестовый проект http://ru.bem.info/articles/start-with-project-stub/ на команде bem make или при заходе на тестовую страничку после запуска bem server падает вот с такой ошибкой
13:13:15.519 - warn: *** HTTP error: 500, Error: Tech module with path '/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/libs/bem-core/.bem/techs/bemhtml.js' not found on require search paths
at exports.Level.INHERIT.resolveTechPath (/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/lib/level.js:280:19)
at exports.Level.INHERIT.resolveTech (/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/lib/level.js:228:25)
at exports.Level.INHERIT.resolveTechName (/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/lib/level.js:244:47)
at exports.Level.INHERIT.resolveTech (/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/lib/level.js:231:25)
at exports.Level.INHERIT.createTech (/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/lib/level.js:206:32)
at exports.Level.INHERIT.getTech (/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/lib/level.js:193:43)
at null. (/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/lib/nodes/bundle.js:64:28)
at Array.forEach (native)
at null. (/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/lib/nodes/bundle.js:62:29)
at Promise.apply (/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/node_modules/q/q.js:1122:26)
at Promise.promise.promiseDispatch (/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/node_modules/q/q.js:752:41)
at /Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/node_modules/q/q.js:1337:14
at flush (/Volumes/Data/Work/antoncars_page/bem2/my-bem-project/node_modules/bem/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:419:13)
Пытаюсь поменть путь к библиотеке environ = require('bem-environ')({ libDir: '../new-lib-name' }), но сборка падает, видимо путь все же зашит в самом беме или других библиотеках.
Указываю это в файла .bem / levels / bundles.js и .bem / levels / blocks.js
the bem methodology uses block__elem--mod but the engine uses block__elem_modName_modValue
how can I configure the engine to use the --mod?
since I have a css framework already defined that way, this would be nice to do
after runnig bem make i see some usual info then:
WARNING! There are 1 unfinished build processes!
This application exit is not planned. Please check that all nodes in arch resolve or reject promises they return.
Dump of plans of unfinished build processes follow.
And a little bit later:
Jobs:
Active jobs: desktop.bundles/index/index.bemhtml.meta.js, desktop.bundles/index/index.js.meta.js, desktop.bundles/index/index.css.meta.js, desktop.bundles/index/index.ie.css.meta.js, desktop.bundles/index/index.ie6.css.meta.js, desktop.bundles/index/index.ie7.css.meta.js, desktop.bundles/index/index.ie8.css.meta.js, desktop.bundles/index/index.ie9.css.meta.js
$ ls -al desktop.bundles/index
total 16
-rw-r--r-- 1 megatolya 593637566 174 18 мар 00:03 index.bemdecl.js
-rw-r--r-- 1 megatolya 593637566 833 18 мар 00:00 index.bemjson.js
-rw-r--r-- 1 megatolya 593637566 0 18 мар 00:03 index.deps.js
removing decl and deps file don't resolve problem. Already recloned repo but still have same error.
Now index build after build:
_index.css
_index.html
_index.js
index.bemdecl.js
index.bemhtml.bemdecl.js
index.bemhtml.deps.js
index.bemhtml.js
index.bemjson.js
index.browser.bemhtml.js
index.browser.js
index.css
index.deps.js
index.html
index.js
index.noprefix.css
index.pre.js
Expected:
tmp/
_index.css
_index.js
index.bemjson.js
index.html
I cloned project-stub (master branch) and run make server
. Got some errors, look here https://gist.github.com/toivonen/6048094
If trying to download smth like http://localhost:8080/desktop.bundles I get errors:
14:00:24.048 - info: [t] Build time for "desktop.bundles/index/index.browser.js+bemhtml" [7]: 26ms
14:00:24.050 - info: [t] Build total for "desktop.bundles/index/_index.js": 195ms
14:00:24.051 - warn: *** HTTP error: 500, TypeError: Object [object Object] has no method 'filterPrefixes'
at exports.techMixin.getBuildResult [as __base] (/Users/toivonen/Work/bem-js-tutorial/libs/bem-core/.bem/techs/vanilla.js.js:49:22)
at exports.techMixin.getBuildResult (/Users/toivonen/Work/bem-js-tutorial/libs/bem-core/.bem/techs/browser.js.js:36:29)
at res.(anonymous function) (/Users/toivonen/Work/bem-js-tutorial/node_modules/bem/node_modules/inherit/lib/inherit.js:28:32)
at exports.techMixin.getBuildResult (/Users/toivonen/Work/bem-js-tutorial/libs/bem-core/.bem/techs/browser.js+bemhtml.js:22:21)
at res.(anonymous function) [as getBuildResult] (/Users/toivonen/Work/bem-js-tutorial/node_modules/bem/node_modules/inherit/lib/inherit.js:28:32)
at /Users/toivonen/Work/bem-js-tutorial/node_modules/bem/lib/tech/v2.js:284:50
at _fulfilled (/Users/toivonen/Work/bem-js-tutorial/node_modules/bem/node_modules/q/q.js:1020:54)
at resolvedValue.promiseDispatch.done (/Users/toivonen/Work/bem-js-tutorial/node_modules/bem/node_modules/q/q.js:1050:30)
at makePromise.promise.promiseDispatch (/Users/toivonen/Work/bem-js-tutorial/node_modules/bem/node_modules/q/q.js:642:13)
at Object._onImmediate (/Users/toivonen/Work/bem-js-tutorial/node_modules/bem/node_modules/q/q.js:521:44)
at processImmediate [as _immediateCallback] (timers.js:330:15)
From previous event:
at Cmd.exports.Cmd.Cmd._do (/Users/toivonen/Work/bem-js-tutorial/node_modules/bem/node_modules/coa/lib/cmd.js:424:14)
at /Users/toivonen/Work/bem-js-tutorial/node_modules/bem/node_modules/coa/lib/cmd.js:510:22
at /Users/toivonen/Work/bem-js-tutorial/node_modules/bem/node_modules/coa/node_modules/q/q.js:893:30
at /Users/toivonen/Work/bem-js-tutorial/node_modules/bem/node_modules/coa/node_modules/q/q.js:360:35
14:00:24.193 - info: [t] Build time for "desktop.bundles/index/_index.css" [6]: 154ms
14:00:24.193 - info: [t] Build total for "desktop.bundles/index/_index.css": 340ms
Loading http://localhost:8080/desktop.bundles/index/index.html works correctly.
C:\bem-tests\tutor>node_modules\.bin\bem make
20:00:27.728 - info: bem 0.8.1
20:00:28.276 - info: Graph:
== root
all
build
desktop.blocks*
desktop.bundles*
desktop.blocks*
20:00:28.279 - info: [i] Going to build 'all' [1]
20:00:29.613 - warn: Level at C:\bem-tests\tutor\common.blocks is not a directory
20:00:29.626 - warn: Level at C:\bem-tests\tutor\desktop.bundles\index\blocks is not a directory
20:00:29.758 - warn: Bundle desktop.bundles\index is configured to build techs stylus, css which have common build suffix css. Consider using only one of these techs.
20:00:29.766 - info: [t] isValid() time for "desktop.bundles\index\index.bemdecl.js" [1]: 3ms
20:00:29.769 - info: [*] make 'desktop.bundles\index\index.bemdecl.js' [1]
20:00:29.821 - info: [t] Build time for "desktop.bundles\index\index.bemdecl.js" [1]: 58ms
20:00:29.823 - info: [t] isValid() time for "desktop.bundles\index\index.deps.js" [1]: 1ms
20:00:29.824 - info: [*] make 'desktop.bundles\index\index.deps.js' [1]
20:00:30.034 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js.js' not found on require search paths
20:00:30.052 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js+browser.js+bemhtml.js' not found on require search paths
20:00:30.064 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.bemjson.js.js'not found on require search paths
20:00:30.590 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js.js' not found on require search paths
20:00:30.604 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js+browser.js+bemhtml.js' not found on require search paths
20:00:30.617 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.bemjson.js.js'not found on require search paths
20:00:30.847 - warn: Tech module with path 'C:\bem-tests\tutor\.bem\techs\styl.js' not found on require search paths
20:00:30.947 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js.js' not found on require search paths
20:00:30.960 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js+browser.js+bemhtml.js' not found on require search paths
20:00:30.973 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.bemjson.js.js'not found on require search paths
20:00:31.682 - warn: Tech module with path 'C:\bem-tests\tutor\.bem\techs\styl.js' not found on require search paths
20:00:31.786 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js.js' not found on require search paths
20:00:31.798 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js+browser.js+bemhtml.js' not found on require search paths
20:00:31.813 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.bemjson.js.js'not found on require search paths
20:00:32.040 - warn: Tech module with path 'C:\bem-tests\tutor\.bem\techs\styl.js' not found on require search paths
20:00:32.159 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js.js' not found on require search paths
20:00:32.173 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js+browser.js+bemhtml.js' not found on require search paths
20:00:32.185 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.bemjson.js.js'not found on require search paths
20:00:32.376 - warn: Tech module with path 'C:\bem-tests\tutor\.bem\techs\styl.js' not found on require search paths
20:00:32.508 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js.js' not found on require search paths
20:00:32.520 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.js+browser.js+bemhtml.js' not found on require search paths
20:00:32.534 - warn: Tech module with path 'C:\bem-tests\tutor\libs\bem-pr\bem\techs\spec.bemjson.js.js'not found on require search paths
20:00:32.836 - info: [t] Build time for "desktop.bundles\index\index.deps.js" [1]: 3014ms
20:00:32.838 - info: [t] isValid() time for "desktop.bundles\index\index.bemhtml" [1]: 0ms
20:00:32.839 - info: [*] make 'desktop.bundles\index\index.bemhtml' [1]
20:00:32.840 - info: [t] isValid() time for "desktop.bundles\index\index.browser.js+bemhtml" [1]: 2ms
20:00:32.840 - info: [*] make 'desktop.bundles\index\index.browser.js+bemhtml' [1]
20:00:32.842 - info: [t] isValid() time for "desktop.bundles\index\index.stylus" [1]: 4ms
20:00:32.842 - info: [*] make 'desktop.bundles\index\index.stylus' [1]
20:00:33.616 - warn: Level at C:\bem-tests\tutor\common.blocks is not a directory
20:00:33.656 - 20:00:33.655 - warnwarn: Level at C:\bem-tests\tutor\desktop.bundles\index\blocks is not a directory: Level at C:\bem-tests\tutor\common.blocks is not a directory
20:00:33.716 - warn: Level at C:\bem-tests\tutor\desktop.bundles\index\blocks is not a directory
20:00:33.776 - warn: Level at C:\bem-tests\tutor\common.blocks is not a directory
20:00:33.793 - info: [t] Build time for "desktop.bundles\index\index.browser.js+bemhtml" [1]: 955ms
20:00:33.795 - info: [t] Build total: 6063ms
20:00:33.802 - warn: Level at C:\bem-tests\tutor\desktop.bundles\index\blocks is not a directory
20:00:34.009 - info: [t] Build time for "desktop.bundles\index\index.bemhtml" [1]: 1171ms
20:00:34.919 - info: [t] Build time for "desktop.bundles\index\index.stylus" [1]: 2081ms
Error: Tech module with path 'C:\bem-tests\tutor\libs\bem-core\libs\bem-core\.bem\techs\browser.js.js' not found on require search paths
at exports.Level.INHERIT.resolveTechPath (C:\bem-tests\tutor\node_modules\bem\lib\level.js:280:19)
at exports.Level.INHERIT.resolveTech (C:\bem-tests\tutor\node_modules\bem\lib\level.js:228:25)
at exports.Level.INHERIT.resolveTechName (C:\bem-tests\tutor\node_modules\bem\lib\level.js:244:47)
at exports.Level.INHERIT.resolveTech (C:\bem-tests\tutor\node_modules\bem\lib\level.js:231:25)
at exports.getTechClass (C:\bem-tests\tutor\node_modules\bem\lib\tech\index.js:42:44)
at exports.createTech (C:\bem-tests\tutor\node_modules\bem\lib\tech\index.js:81:21)
at Object.pathToName (C:\bem-tests\tutor\node_modules\bem\lib\context.js:26:25)
at Array.map (native)
at Object.exports.Context.INHERIT.initOptsTechs (C:\bem-tests\tutor\node_modules\bem\lib\context.js:34:45)
at Object.exports.Context.INHERIT.__constructor (C:\bem-tests\tutor\node_modules\bem\lib\context.js:16:27)
выполнил
git clone https://github.com/bem/project-stub.git -b bem-core my-bem-project
cd my-bem-project
npm install
запустил
./node_modules/bem/bin/bem server
перешел по адрессу
http://127.0.0.1:8080/desktop.bundles/index/index.html
и в результате получил вот такую простыню
HTTP error 500
TypeError: Cannot read property 'type' of undefined
at BEMContext. (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1157:40)
at Array.map (native)
at $g1 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1153:51)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:24:20)
at __$b68 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:820:22)
at __$g3 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1372:16)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:30:20)
at __$b58 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:509:17)
at __$g3 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1317:24)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:30:20)
at __$b101 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1002:5)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:99:20)
at __$lb$212 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:977:22)
at $b100 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:980:7)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:96:24)
at __$b68 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:836:26)
at __$g3 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1372:16)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:30:20)
at __$b101 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1002:5)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:99:20)
at __$lb$212 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:977:22)
at $b100 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:980:7)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:96:24)
at __$b68 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:836:26)
at __$g3 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1372:16)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:30:20)
at __$b101 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1002:5)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:99:20)
at __$lb$212 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:977:22)
at $b100 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:980:7)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:96:24)
at __$lb$212 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:977:22)
at $b100 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:980:7)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:96:24)
at __$b68 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:836:26)
at __$g3 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1372:16)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:30:20)
at __$b66 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:651:18)
at __$g3 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1363:28)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:30:20)
at __$b101 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1002:5)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:99:20)
at __$lb$212 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:977:22)
at $b100 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:980:7)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:96:24)
at __$b68 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:836:26)
at __$g3 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1372:16)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:30:20)
at __$b101 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1002:5)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:99:20)
at __$lb$212 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:977:22)
at __$b100 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:980:7)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:96:24)
at __$b67 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:688:18)
at __$g3 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1368:24)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:30:20)
at __$b101 (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:1002:5)
at applyc (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:99:20)
at BEMContext.apply (/Users/12/Desktop/4pda4u/desktop.bundles/index/index.bemhtml.js:9:16)
at Object.BEMContext_apply as apply
at /Users/12/Desktop/4pda4u/libs/bem-core/.bem/techs/html.js:36:32
at /Users/12/Desktop/4pda4u/node_modules/bem/node_modules/q/q.js:1186:26
at _fulfilled (/Users/12/Desktop/4pda4u/node_modules/bem/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/Users/12/Desktop/4pda4u/node_modules/bem/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/Users/12/Desktop/4pda4u/node_modules/bem/node_modules/q/q.js:760:13)
at /Users/12/Desktop/4pda4u/node_modules/bem/node_modules/q/q.js:526:49
at flush (/Users/12/Desktop/4pda4u/node_modules/bem/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:339:11)
Давайте заиспользует showcase из bem-components
вместо непонятного бандла.
After cloning and trying to make
it there was that error:
npm ERR! addPlacedTarball Could not remove "/Users/kizu/.npm/mocha/1.3.2/package"
npm ERR! Error: EACCES, rmdir '/Users/kizu/.npm/mocha/1.3.2/package'
npm ERR! { [Error: EACCES, rmdir '/Users/kizu/.npm/mocha/1.3.2/package']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/kizu/.npm/mocha/1.3.2/package' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 12.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/kizu/Яндекс.Диск/Projects/project-stub
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61
npm ERR! path /Users/kizu/.npm/mocha/1.3.2/package
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, rmdir '/Users/kizu/.npm/mocha/1.3.2/package'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/kizu/Яндекс.Диск/Projects/project-stub/npm-debug.log
npm ERR! not ok code 0
make: *** [node_modules] Error 3
running sudo make
helped.
No index.html got after opening http://localhost:8080/
:
After that I've tried to add exports PATH=./node_modules/.bin:$PATH
to my .profile
and then after running make
got this error:
events.js:66
throw arguments[1]; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:769:11)
at Server._listen2 (net.js:909:14)
at listen (net.js:936:10)
at Server.listen (net.js:985:5)
at exports.Server.self.listen (/Users/kizu/Яндекс.Диск/Projects/project-stub/node_modules/bem/node_modules/q-http/q-http.js:131:23)
at exports.Server.INHERIT.startServer (/Users/kizu/Яндекс.Диск/Projects/project-stub/node_modules/bem/lib/base-server.js:87:36)
at exports.Server.INHERIT.startServer (/Users/kizu/Яндекс.Диск/Projects/project-stub/node_modules/bem/lib/server.js:18:28)
at keys.forEach.res.(anonymous function) [as startServer] (/Users/kizu/Яндекс.Диск/Projects/project-stub/node_modules/bem/node_modules/inherit/lib/inherit.js:28:32)
at exports.Server.INHERIT.startServers (/Users/kizu/Яндекс.Диск/Projects/project-stub/node_modules/bem/lib/base-server.js:64:45)
at _fulfilled (/Users/kizu/Яндекс.Диск/Projects/project-stub/node_modules/bem/node_modules/q/q.js:822:32)
at resolvedValue.promiseSend.done (/Users/kizu/Яндекс.Диск/Projects/project-stub/node_modules/bem/node_modules/q/q.js:852:30)
at makePromise.promise.promiseSend (/Users/kizu/Яндекс.Диск/Projects/project-stub/node_modules/bem/node_modules/q/q.js:487:13)
at pending (/Users/kizu/Яндекс.Диск/Projects/project-stub/node_modules/bem/node_modules/q/q.js:388:35)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
make: *** [server] Error 1
I've waited for a bit, ran make
again and the bem server started successfully, but I still see the content as on screenshot above at the localhost.
Navigating to http://localhost:8080/desktop.bundles/index/index.html
gives me this error:
HTTP error: 500, Error: Command failed: fatal: Unable to create '/Users/kizu/Яндекс.Диск/Projects/project-stub/bemhtml/.git/index.lock': Permission denied
error: cannot open .git/FETCH_HEAD: Permission denied
at ChildProcess.exithandler (child_process.js:540:15)
at ChildProcess.EventEmitter.emit (events.js:91:17)
at maybeClose (child_process.js:638:16)
at Process._handle.onexit (child_process.js:680:5)
or this one:
HTTP error: 500, Error: Command failed: fatal: Unable to create '/Users/kizu/Яндекс.Диск/Projects/project-stub/bemhtml/.git/index.lock': Permission denied
error: cannot open .git/FETCH_HEAD: Permission denied
at ChildProcess.exithandler (child_process.js:540:15)
at ChildProcess.EventEmitter.emit (events.js:91:17)
at maybeClose (child_process.js:638:16)
at Socket.ChildProcess.spawn.stdin (child_process.js:815:11)
at Socket.EventEmitter.emit (events.js:88:17)
at Socket._destroy.destroyed (net.js:357:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
Раз уж мы начали выпускать версии project-stub
, кажется, стоит задуматься о том, чтобы поддерживать только 1 актуальную версию.
Если кому-то нужны стабы с другим набором технологий, то логично вынести это в отдельные репозитории или в generator-bem-stub
.
Сделал по инструкции
git clone https://github.com/bem/project-stub.git -b bem-core my-bem-project
cd my-bem-project
npm install
и сразу же получил ошибку
400 getting enb-borchick-1.1.1 ( как-то так )
Посмотрел а релиза 1.1.1 нигде не нашел - ландо. Ушел в package.json поменял на 1.1.0. npm i заработал. Все супер.
Дальше сделал
node_modules/bem/bin/bem server
И получил новую ошибку
can't finde module roole
npm i roole --save
(facepalm)
Ок повторил
node_modules/bem/bin/bem server
Куча варнингов и ни одной ошибки. Ну думаю я - это же БЭМ и пошел спокойно на http://localhost:8080/desktop.bundles/index - и что же я увидел. Голый HTML o_O
Во первых:
16:15:45.330 - warn: *** HTTP error: 404, /Users/12/Desktop/4pda4u/desktop.bundles/_index.css
16:15:45.342 - warn: *** HTTP error: 404, /Users/12/Desktop/4pda4u/desktop.bundles/_index.js
Почему варнинги? Не вижу в этом никакой логики. Выдавайте ошибки.
Во-вторых:
Что опять я сделал не так? как это вообще можно понять?
Вывод bem server:
node_modules/bem/bin/bem server
16:15:35.826 - info: bem 0.9.0
16:15:35.830 - info: Project root is '/Users/12/Desktop/4pda4u'
16:15:36.015 - info: Graph:
== root
all
build
common.blocks*
desktop.blocks*
desktop.bundles*
common.blocks*
desktop.blocks*
16:15:36.020 - info: Server is listening on port 8080. Point your browser to http://localhost:8080/
16:15:43.433 - info: [i] Going to build 'desktop.bundles*' [1]
16:15:43.818 - info: [i] Going to build 'desktop.bundles/index*' [2]
16:15:43.858 - warn: Level at /Users/12/Desktop/4pda4u/desktop.bundles/index/blocks is not a directory
16:15:43.892 - info: [i] Going to build 'desktop.bundles/index' [3]
16:15:43.922 - info: [t] isValid() time for "desktop.bundles/index/index.bemdecl.js" [3]: 1ms
16:15:43.922 - info: [t] isValid() time for "desktop.bundles/index/index.deps.js" [3]: 0ms
16:15:43.922 - info: [*] make 'desktop.bundles/index/index.deps.js' [3]
16:15:44.013 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-core/libs/bem-pr/bem/techs/spec.js.js' not found on require search paths
16:15:44.014 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-core/libs/bem-pr/bem/techs/spec.js+browser.js+bemhtml.js' not found on require search paths
16:15:44.016 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-core/libs/bem-pr/bem/techs/spec.bemjson.js.js' not found on require search paths
16:15:44.094 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-core/libs/bem-pr/bem/techs/spec.js.js' not found on require search paths
16:15:44.096 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-core/libs/bem-pr/bem/techs/spec.js+browser.js+bemhtml.js' not found on require search paths
16:15:44.097 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-core/libs/bem-pr/bem/techs/spec.bemjson.js.js' not found on require search paths
16:15:44.248 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/bemhtml.js' not found on require search paths
16:15:44.250 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/vanilla.js.js' not found on require search paths
16:15:44.251 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/browser.js.js' not found on require search paths
16:15:44.253 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.js.js' not found on require search paths
16:15:44.254 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.js+browser.js+bemhtml.js' not found on require search paths
16:15:44.255 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.bemjson.js.js' not found on require search paths
16:15:44.353 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/bemhtml.js' not found on require search paths
16:15:44.354 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/vanilla.js.js' not found on require search paths
16:15:44.355 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/browser.js.js' not found on require search paths
16:15:44.356 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.js.js' not found on require search paths
16:15:44.357 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.js+browser.js+bemhtml.js' not found on require search paths
16:15:44.358 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.bemjson.js.js' not found on require search paths
16:15:44.419 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/bemhtml.js' not found on require search paths
16:15:44.420 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/vanilla.js.js' not found on require search paths
16:15:44.421 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/browser.js.js' not found on require search paths
16:15:44.422 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.js.js' not found on require search paths
16:15:44.423 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.js+browser.js+bemhtml.js' not found on require search paths
16:15:44.424 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.bemjson.js.js' not found on require search paths
16:15:44.492 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/bemhtml.js' not found on require search paths
16:15:44.493 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/vanilla.js.js' not found on require search paths
16:15:44.494 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-core/.bem/techs/browser.js.js' not found on require search paths
16:15:44.495 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.js.js' not found on require search paths
16:15:44.497 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.js+browser.js+bemhtml.js' not found on require search paths
16:15:44.498 - warn: Tech module with path '/Users/12/Desktop/4pda4u/libs/bem-components/libs/bem-pr/bem/techs/spec.bemjson.js.js' not found on require search paths
16:15:44.512 - info: [t] Build time for "desktop.bundles/index/index.deps.js" [3]: 590ms
16:15:44.513 - info: [t] isValid() time for "desktop.bundles/index/index.bemhtml" [3]: 0ms
16:15:44.513 - info: [*] make 'desktop.bundles/index/index.bemhtml' [3]
16:15:44.513 - info: [t] isValid() time for "desktop.bundles/index/index.browser.js+bemhtml" [3]: 0ms
16:15:44.514 - info: [*] make 'desktop.bundles/index/index.browser.js+bemhtml' [3]
16:15:44.514 - info: [t] isValid() time for "desktop.bundles/index/index.roole" [3]: 1ms
16:15:44.514 - info: [*] make 'desktop.bundles/index/index.roole' [3]
16:15:44.985 - warn: Level at /Users/12/Desktop/4pda4u/desktop.bundles/index/blocks is not a directory
16:15:44.986 - warn: Level at /Users/12/Desktop/4pda4u/desktop.bundles/index/blocks is not a directory
16:15:44.989 - warn: Level at /Users/12/Desktop/4pda4u/desktop.bundles/index/blocks is not a directory
16:15:45.084 - info: [t] Build time for "desktop.bundles/index/index.bemhtml" [3]: 571ms
16:15:45.091 - info: [t] isValid() time for "desktop.bundles/index/_index.bemhtml.js" [3]: 4ms
16:15:45.095 - info: [t] isValid() time for "desktop.bundles/index/index.html" [3]: 3ms
16:15:45.101 - info: [t] Build time for "desktop.bundles/index/index.browser.js+bemhtml" [3]: 588ms
16:15:45.103 - info: [t] isValid() time for "desktop.bundles/index/_index.js" [3]: 1ms
16:15:45.175 - info: [t] Build time for "desktop.bundles/index/index.roole" [3]: 662ms
16:15:45.177 - info: [t] isValid() time for "desktop.bundles/index/index.css" [3]: 1ms
16:15:45.198 - info: [t] isValid() time for "desktop.bundles/index/_index.css" [3]: 21ms
16:15:45.201 - info: [t] Build total for "desktop.bundles/index": 1319ms
16:15:45.276 - info: [i] Going to build 'desktop.bundles*' [4]
16:15:45.324 - info: [i] Going to build 'desktop.bundles*' [5]
16:15:45.330 - warn: *** HTTP error: 404, /Users/12/Desktop/4pda4u/desktop.bundles/_index.css
16:15:45.342 - warn: *** HTTP error: 404, /Users/12/Desktop/4pda4u/desktop.bundles/_index.js
^C16:18:51.436 - info: Servers were stopped
Hi there!
At the moment 'npm install' fails on Window because of arikon/bower-npm-install#10, please force the issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.