我安装了节点和npm,然后我通过gobally和local来表达。我正在学习本教程。
但是当我输入命令express,或者表达-c stylus时,它询问Destination是不是空的?然后它说堕胎。
但是创建了包。
abhishek@TiltedLines:~/blog$ express mytestapp
create : mytestapp
create : mytestapp/package.json
create : mytestapp/app.js
create : mytestapp/public
create : mytestapp/public/images
create : mytestapp/public/stylesheets
create : mytestapp/public/stylesheets/style.css
create : mytestapp/routes
create : mytestapp/routes/index.js
create : mytestapp/views
create : mytestapp/views/layout.jade
create : mytestapp/views/index.jade
create : mytestapp/public/javascripts
dont forget to install dependencies:
$ cd mytestapp && npm install
abhishek@TiltedLines:~/blog$ express -c stylus
destination is not empty, continue?
aborting
abhishek@TiltedLines:~/blog$ express
destination is not empty, continue?
aborting
abhishek@TiltedLines:~/blog$ express
destination is not empty, continue?
aborting
abhishek@TiltedLines:~/blog$ cd mytestapp
abhishek@TiltedLines:~/blog/mytestapp$ npm install
npm WARN engine express@2.5.8: wanted: {"node":">= 0.4.1 < 0.7.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
express@2.5.8 node_modules/express
├── qs@0.4.2
├── mime@1.2.4
├── mkdirp@0.3.0
└── connect@1.9.2 (formidable@1.0.17)
jade@1.9.2 node_modules/jade
├── character-parser@1.2.1
├── void-elements@2.0.1
├── commander@2.6.0
├── mkdirp@0.5.0 (minimist@0.0.8)
├── with@4.0.3 (acorn-globals@1.0.4, acorn@1.0.3)
├── constantinople@3.0.1 (acorn-globals@1.0.4)
└── transformers@2.1.0 (promise@2.0.0, css@1.0.8, uglify-js@2.2.5)
abhishek@TiltedLines:~/blog/mytestapp$ express -c stylus
destination is not empty, continue?
aborting
abhishek@TiltedLines:~/blog/mytestapp$ express
destination is not empty, continue?
答案 0 :(得分:1)
您希望将选项作为运行的单个快速生成器的一部分运行,而不是作为单独的调用运行。从您的示例输出中,您将在mytestapp
下生成一个应用程序,然后在生成的express -c stylus
目录外部运行mytestapp
命令时,在上面创建的css样式。 / p>
尝试在空目录中运行以下命令:
express -c stylus mytestapp
这将使用手写笔css引擎创建您的应用。