Мне срочно нужен был редактор для изучения nodejs. Решил, что написанный на nodejs редактор - это двойная выгода. Здесь просто лог моих действий. Все делал по инструкции и скопировал выходной поток консоли. Дабы был пример "правильной" работы npm
Действуем согласно инструкции cloud9#installation-and-usage, вот она:¶
#Requirements:
NodeJS >= 0.6.16
NPM >= 1.1.16
libxml2-dev
#Install:
git clone https://github.com/ajaxorg/cloud9.git
cd cloud9
npm install
#The above install steps create a cloud9 directory with a bin/cloud9.sh
#script that can be used to start Cloud9:
bin/cloud9.sh
Проверяем требования, не уверен, есть ли у меня libxml2-dev
root@kali:/home/kiss# locate libxml2-dev
/usr/share/doc/libxml2-dev
/usr/share/doc/libxml2-dev/AUTHORS
/usr/share/doc/libxml2-dev/NEWS.gz
/usr/share/doc/libxml2-dev/README
/usr/share/doc/libxml2-dev/TODO.gz
/usr/share/doc/libxml2-dev/changelog.Debian.gz
/usr/share/doc/libxml2-dev/copyright
/var/cache/apt/archives/libxml2-dev_2.8.0+dfsg1-7+nmu3_i386.deb
/var/cache/apt/archives/libxml2-dev_2.8.0+dfsg1-7+wheezy2_i386.deb
/var/lib/dpkg/info/libxml2-dev:i386.list
/var/lib/dpkg/info/libxml2-dev:i386.md5sums
/var/lib/dpkg/info/libxml2-dev:i386.preinst
Пробуем копирование с Git¶
root@kali:/home/kiss# git clone https://github.com/ajaxorg/cloud9.git
Cloning into 'cloud9'...
remote: Counting objects: 74849, done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 74849 (delta 1), reused 40 (delta 1)
Receiving objects: 100% (74849/74849), 117.55 MiB | 1.74 MiB/s, done.
Resolving deltas: 100% (49302/49302), done.
npm install -эту волшебную команду надо запомнить¶
root@kali:/home/kiss# cd cloud9
root@kali:/home/kiss/cloud9# npm install
npm WARN excluding symbolic link test/mock/dirLink -> dir
npm WARN excluding symbolic link test/mock/fileLink.txt -> file.txt
npm WARN excluding symbolic link test/node_modules/vfs-local -> ../..
npm WARN excluding symbolic link test/assets/symlink-dir/dir/symlink-dir -> ..
npm WARN excluding symbolic link tests/public/smith.js -> ../../smith.js
npm WARN engine connect@1.8.7: wanted: {"node":">= 0.4.1 < 0.7.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine architect-agent@0.2.2: wanted: {"node":"~0.6.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN excluding symbolic link test/mock/dirLink -> dir
npm WARN excluding symbolic link test/mock/fileLink.txt -> file.txt
npm WARN excluding symbolic link test/node_modules/vfs-local -> ../..
npm WARN excluding symbolic link tests/public/smith.js -> ../../smith.js
npm WARN excluding symbolic link test/assets/symlink-dir/dir/symlink-dir -> ..
npm WARN excluding symbolic link node_modules/vfs-child -> ../child
npm WARN excluding symbolic link node_modules/vfs-composite -> ../composite
npm WARN excluding symbolic link node_modules/vfs-http-transport -> ../http-transport
npm WARN excluding symbolic link node_modules/vfs-child -> ../child
npm WARN excluding symbolic link node_modules/vfs-composite -> ../composite
npm WARN excluding symbolic link node_modules/vfs-http-transport -> ../http-transport
> ws@0.4.25 install /home/kiss/cloud9/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/home/kiss/cloud9/node_modules/engine.io/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory `/home/kiss/cloud9/node_modules/engine.io/node_modules/ws/build'
> ws@0.4.32 install /home/kiss/cloud9/node_modules/vfs-architect/node_modules/vfs/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/home/kiss/cloud9/node_modules/vfs-architect/node_modules/vfs/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory `/home/kiss/cloud9/node_modules/vfs-architect/node_modules/vfs/node_modules/ws/build'
> ws@0.4.25 install /home/kiss/cloud9/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/home/kiss/cloud9/node_modules/engine.io-client/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory `/home/kiss/cloud9/node_modules/engine.io-client/node_modules/ws/build'
> gnu-tools@0.0.8 postinstall /home/kiss/cloud9/node_modules/jsDAV/node_modules/gnu-tools
> node ./install.js
path.existsSync is now called `fs.existsSync`.
Creating directory /home/kiss/cloud9/node_modules/jsDAV/node_modules/gnu-tools/bin
path.exists is now called `fs.exists`.
Grand, you've already got 'find' and 'grep' on your system.
Linking /usr/bin/find to /home/kiss/cloud9/node_modules/jsDAV/node_modules/gnu-tools/bin/find
Linking /bin/grep to /home/kiss/cloud9/node_modules/jsDAV/node_modules/gnu-tools/bin/grep
npm WARN cannot run in wd cloud9@0.7.0 make ace (wd=/home/kiss/cloud9)
simple-template@0.0.1 node_modules/simple-template
http-error@0.0.1 node_modules/http-error
vfs-nodefs-adapter@0.3.0 node_modules/vfs-nodefs-adapter
netutil@0.0.1 node_modules/netutil
msgpack-js-browser@0.1.4 node_modules/msgpack-js-browser
mappings@0.1.5 node_modules/mappings
colors@0.6.2 node_modules/colors
architect-agent@0.2.2 node_modules/architect-agent
amd-loader@0.0.4 node_modules/amd-loader
architect@0.1.11 node_modules/architect
async@0.1.21 node_modules/async
rimraf@2.0.1 node_modules/rimraf
└── graceful-fs@1.1.14
v8debug@0.1.1 node_modules/v8debug
asyncjs@0.0.9 node_modules/asyncjs
optimist@0.3.4 node_modules/optimist
└── wordwrap@0.0.2
connect-architect@0.0.6 node_modules/connect-architect
└── mime@1.3.4
treehugger@0.0.1 node_modules/treehugger
architect-socket-transport@0.3.0 node_modules/architect-socket-transport
└── msgpack-js@0.1.5
smith@0.1.21 node_modules/smith
└── msgpack-js@0.1.5
dryice@0.4.10 node_modules/dryice
└── uglify-js@1.3.5
connect@1.8.7 node_modules/connect
├── mime@1.3.4
├── formidable@1.0.16
└── qs@2.3.3
vfs-local@0.3.11 node_modules/vfs-local
└── simple-mime@0.0.8
nodeunit@0.7.4 node_modules/nodeunit
└── tap@0.5.0 (yamlish@0.0.6, inherits@2.0.1, deep-equal@0.0.0, buffer-equal@0.0.1, slide@1.1.6, nopt@2.2.1, mkdirp@0.5.0, difflet@0.2.6, glob@3.2.11, runforcover@0.0.2)
ace@1.0.0 node_modules/ace
└── mime@1.2.11
engine.io@0.5.0 node_modules/engine.io
├── base64id@0.1.0
├── debug@0.6.0
├── engine.io-parser@0.3.0
└── ws@0.4.25 (tinycolor@0.0.1, options@0.0.6, commander@0.6.1)
vfs-architect@0.0.2 node_modules/vfs-architect
├── vfs-http-adapter@0.2.3
└── vfs@0.0.2 (simple-mime@0.0.8, ws@0.4.32)
engine.io-client@0.5.0 node_modules/engine.io-client
├── emitter@1.0.0
├── engine.io-parser@0.3.0
├── debug@0.7.2
├── xmlhttprequest@1.5.0
└── ws@0.4.25 (tinycolor@0.0.1, options@0.0.6, commander@0.6.1)
jsDAV@0.2.6 node_modules/jsDAV
├── xmldom@0.1.2
├── node-sftp@0.1.1
├── asyncjs@0.0.8
├── formidable@1.0.9
├── jsftp@0.5.5 (streamer@0.2.1)
└── gnu-tools@0.0.8
Теперь запустим IDE¶
root@kali:/home/kiss/cloud9# bin/cloud9.sh
root@kali:/home/kiss/cloud9# bin/cloud9.sh
mkdir -p plugins-client/lib.ace/www/worker
rm -rf /tmp/c9_worker_build
mkdir -p /tmp/c9_worker_build/ext
ln -s `pwd`/plugins-client/ext.language /tmp/c9_worker_build/ext/language
ln -s `pwd`/plugins-client/ext.codecomplete /tmp/c9_worker_build/ext/codecomplete
ln -s `pwd`/plugins-client/ext.jslanguage /tmp/c9_worker_build/ext/jslanguage
ln -s `pwd`/plugins-client/ext.csslanguage /tmp/c9_worker_build/ext/csslanguage
ln -s `pwd`/plugins-client/ext.htmllanguage /tmp/c9_worker_build/ext/htmllanguage
ln -s `pwd`/plugins-client/ext.linereport /tmp/c9_worker_build/ext/linereport
ln -s `pwd`/plugins-client/ext.linereport_php /tmp/c9_worker_build/ext/linereport_php
ln -s `pwd`/plugins-client/ext.linereport_python /tmp/c9_worker_build/ext/linereport_python
node Makefile.dryice.js worker
# cloud9 worker ---------
copy.source.commonjs is deprecated, pass { project:... includes:...} directly as a source
- ace/lib/fixoldbrowsers.js has define(...) with non-array parameter. Ignoring requirement.
- ace/lib/regexp.js has define(...) with non-array parameter. Ignoring requirement.
- ace/lib/es5-shim.js has define(...) with non-array parameter. Ignoring requirement.
- ace/lib/event_emitter.js has define(...) with non-array parameter. Ignoring requirement.
- ace/lib/oop.js has define(...) with non-array parameter. Ignoring requirement.
- ext/language/worker.js has define(...) with non-array parameter. Ignoring requirement.
- ext/language/worker.js has require(...) with non-string parameter. Ignoring requirement.
- ext/language/worker.js has require(...) with non-string parameter. Ignoring requirement.
- ace/worker/mirror.js has define(...) with non-array parameter. Ignoring requirement.
- ace/document.js has define(...) with non-array parameter. Ignoring requirement.
- ace/range.js has define(...) with non-array parameter. Ignoring requirement.
- ace/anchor.js has define(...) with non-array parameter. Ignoring requirement.
- ace/lib/lang.js has define(...) with non-array parameter. Ignoring requirement.
- treehugger/tree.js has define(...) with non-array parameter. Ignoring requirement.
- ext/linereport/linereport_base.js has define(...) with non-array parameter. Ignoring requirement.
- ext/language/base_handler.js has define(...) with non-array parameter. Ignoring requirement.
- ext/language/syntax_detector.js has define(...) with non-array parameter. Ignoring requirement.
- ext/codecomplete/complete_util.js has define(...) with non-array parameter. Ignoring requirement.
- ext/codecomplete/local_completer.js has define(...) with non-array parameter. Ignoring requirement.
- ext/codecomplete/snippet_completer.js has define(...) with non-array parameter. Ignoring requirement.
- ext/codecomplete/open_files_local_completer.js has define(...) with non-array parameter. Ignoring requirement.
- ext/jslanguage/parse.js has define(...) with non-array parameter. Ignoring requirement.
- treehugger/js/parse.js has define(...) with non-array parameter. Ignoring requirement.
- treehugger/js/uglifyparser.js has define(...) with non-array parameter. Ignoring requirement.
- treehugger/traverse.js has define(...) with non-array parameter. Ignoring requirement.
- ext/jslanguage/scope_analyzer.js has define(...) with non-array parameter. Ignoring requirement.
- ext/jslanguage/outline.js has define(...) with non-array parameter. Ignoring requirement.
- ext/jslanguage/jshint.js has define(...) with non-array parameter. Ignoring requirement.
- ace/mode/javascript/jshint.js has define(...) with non-array parameter. Ignoring requirement.
- ext/jslanguage/JSResolver.js has define(...) with non-array parameter. Ignoring requirement.
- ext/language/MarkerResolution.js has define(...) with non-array parameter. Ignoring requirement.
- ext/jslanguage/jumptodef.js has define(...) with non-array parameter. Ignoring requirement.
- ext/jslanguage/debugger.js has define(...) with non-array parameter. Ignoring requirement.
- ext/csslanguage/css_handler.js has define(...) with non-array parameter. Ignoring requirement.
- ext/csslanguage/csslint.js has define(...) with non-array parameter. Ignoring requirement.
- ext/htmllanguage/html_completer.js has define(...) with non-array parameter. Ignoring requirement.
- ext/htmllanguage/snippets.js has define(...) with non-array parameter. Ignoring requirement.
- ext/codecomplete/mode_completer.js has define(...) with non-array parameter. Ignoring requirement.
- ext/linereport_php/linereport_php_worker.js has define(...) with non-array parameter. Ignoring requirement.
- ext/linereport_python/linereport_python_worker.js has define(...) with non-array parameter. Ignoring requirement.
cp node_modules/ace/build/src/worker* plugins-client/lib.ace/www/worker
cp: cannot stat `node_modules/ace/build/src/worker*': No such file or directory
make: *** [plugins-client/lib.ace/www/worker/worker-language.js] Error 1
Linux 32 bit
connect plugin start
Connect server listening at http://localhost:3131
IDE SERVER PLUGIN: auth
IDE SERVER PLUGIN: git
IDE SERVER PLUGIN: gittools
IDE SERVER PLUGIN: hg
IDE SERVER PLUGIN: npm
IDE SERVER PLUGIN: filelist
IDE SERVER PLUGIN: search
IDE SERVER PLUGIN: revisions
IDE SERVER PLUGIN: settings
IDE SERVER PLUGIN: shell
IDE SERVER PLUGIN: state
IDE SERVER PLUGIN: watcher
IDE SERVER PLUGIN: node-runtime
IDE SERVER PLUGIN: npm-runtime
IDE SERVER PLUGIN: python-runtime
IDE SERVER PLUGIN: apache-runtime
IDE SERVER PLUGIN: ruby-runtime
IDE SERVER PLUGIN: php-runtime
Started '/home/kiss/cloud9/configs/default'!
IDE server initialized. Listening on localhost:3131
^C
root@kali:/home/kiss/cloud9# ^C
И в окне браузера открылся полноценный редактор (точнее, IDE), мы его поюзали слегка, убедилисьЮ что все работает..., а потом решили поменять пространство имен. Сначала я тупо поробовал поменять директорию запуска, но на первый взгляд ничего не изменилось...
root@kali:/home/kiss# ls
car_stat_csv Desktop GitMyScrapy mailru node-latest.tar.gz
cloud9 Downloads gurl nodejs-screencast node-v0.12.0 sketchbook
root@kali:/home/kiss# cd nodejs-screencast
root@kali:/home/kiss/nodejs-screencast#
#Запускаем скрипт из другой директории
root@kali:/home/kiss/nodejs-screencast# ../cloud9/bin/cloud9.sh
make: Nothing to be done for `worker'.
Linux 32 bit
connect plugin start
Connect server listening at http://localhost:3131
IDE SERVER PLUGIN: auth
IDE SERVER PLUGIN: git
IDE SERVER PLUGIN: gittools
IDE SERVER PLUGIN: hg
IDE SERVER PLUGIN: npm
IDE SERVER PLUGIN: filelist
IDE SERVER PLUGIN: search
IDE SERVER PLUGIN: revisions
IDE SERVER PLUGIN: settings
IDE SERVER PLUGIN: shell
IDE SERVER PLUGIN: state
IDE SERVER PLUGIN: watcher
IDE SERVER PLUGIN: node-runtime
IDE SERVER PLUGIN: npm-runtime
IDE SERVER PLUGIN: python-runtime
IDE SERVER PLUGIN: apache-runtime
IDE SERVER PLUGIN: ruby-runtime
IDE SERVER PLUGIN: php-runtime
Started '/home/kiss/cloud9/configs/default'!
IDE server initialized. Listening on localhost:3131
Посты чуть ниже также могут вас заинтересовать
Комментариев нет:
Отправить комментарий