我在 NodeJs 方面没有太多经验。我想试试 Cyclejs。文档说:
创建一个新目录并在该目录中运行它:
npm install rx @cycle/core @cycle/dom
当我这样做时,我收到以下警告:
➜ cycle-examples npm install rx @cycle/core @cycle/dom
/Users/mertnuhoglu/projects/js/tmp2/cycle-examples
├── @cycle/core@5.0.1
├─┬ @cycle/dom@7.1.1
│ ├─┬ es6-map@0.1.1
│ │ ├── d@0.1.1
│ │ ├─┬ es5-ext@0.10.8
│ │ │ ├── es6-iterator@2.0.0
│ │ │ └── es6-symbol@3.0.1
│ │ ├─┬ es6-iterator@0.1.3
│ │ │ └── es6-symbol@2.0.1
│ │ ├─┬ es6-set@0.1.2
│ │ │ ├── es6-iterator@2.0.0
│ │ │ └── es6-symbol@3.0.1
│ │ ├── es6-symbol@0.1.1
│ │ └── event-emitter@0.3.4
│ ├── matches-selector@1.0.0
│ ├── vdom-parser@1.2.1
│ ├─┬ vdom-to-html@2.1.1
│ │ ├── escape-html@1.0.3
│ │ ├─┬ param-case@1.1.1
│ │ │ └─┬ sentence-case@1.1.2
│ │ │ └── lower-case@1.1.2
│ │ └── xtend@4.0.0
│ ├─┬ virtual-dom@2.1.1
│ │ ├── browser-split@0.0.1
│ │ ├─┬ error@4.4.0
│ │ │ ├── camelize@1.0.0
│ │ │ └── string-template@0.2.1
│ │ ├─┬ ev-store@7.0.0
│ │ │ └── individual@3.0.0
│ │ ├─┬ global@4.3.0
│ │ │ ├─┬ min-document@2.17.0
│ │ │ │ └── dom-walk@0.1.1
│ │ │ └── process@0.5.2
│ │ ├── is-object@1.0.1
│ │ ├── next-tick@0.2.2
│ │ └── x-is-string@0.1.0
│ └── x-is-array@0.1.0
└── rx@4.0.6
npm WARN ENOENT ENOENT, open '/Users/mertnuhoglu/projects/js/tmp2/cycle-examples/package.json'
npm WARN EPACKAGEJSON cycle-examples No description
npm WARN EPACKAGEJSON cycle-examples No repository field.
npm WARN EPACKAGEJSON cycle-examples No README data
npm WARN EPACKAGEJSON cycle-examples No license field.
之后我克隆了循环示例并npm start
按照说明运行。我收到以下错误:
➜ cycle-examples git clone https://github.com/cyclejs/cycle-examples
Cloning into 'cycle-examples'...
remote: Counting objects: 184, done.
remote: Total 184 (delta 0), reused 0 (delta 0), pack-reused 184
Receiving objects: 100% (184/184), 31.08 KiB | 0 bytes/s, done.
Resolving deltas: 100% (72/72), done.
Checking connectivity... done.
➜ cycle-examples npm start
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.12.7
npm ERR! npm v3.3.8
npm ERR! path /Users/mertnuhoglu/projects/js/tmp2/cycle-examples/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! enoent ENOENT, open '/Users/mertnuhoglu/projects/js/tmp2/cycle-examples/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /Users/mertnuhoglu/projects/js/tmp2/cycle-examples/npm-debug.log
错误说我需要package.json
. git 存储库没有它。我应该自己创建吗?如果是这样,我应该在该文件中放入什么?
npm 版本是 3.3.8
我在 Node.js 中全局安装了 browserify@11.2.0 和 babel@5.8.23 库。