1

在按照安装说明使用 docpad run 后,我能够使用 docpad init 创建成功的结果,但是当我使用 run 时出现以下错误,并且当我按照建议运行 docpad update 时,出现另一个错误。

我用 nvm 安装了节点,我认为 npm 附带了节点的安装

git clone git://github.com/creationix/nvm.git ~/.nvm
printf "\n\n# NVM\nif [ -s ~/.nvm/nvm.sh ]; then\n\tNVM_DIR=~/.nvm\n\tsource ~/.nvm/nvm.sh\nfi" >> ~/.bashrc
NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh

nvm install v0.10.15
nvm alias default 0.10
nvm use 0.10

运行错误

warning: Your project's local DocPad version is 6.48.0 instead of 6.48.1, you may experience problems. Run `docpad update` to fix this.
info: DocPad listening to http://localhost:9778/ on directory /Users/anderskitson/sites/techbasics/out
info: LiveReload listening to new socket on channel /docpad-livereload
info: Generating...
warning: Something went wrong while rendering: styles/style.css.scss
error: Something went wrong with the action
error: An error occured: 
Error: write EPIPE
    at errnoException (net.js:901:11)
    at Object.afterWrite (net.js:718:19)

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: write after end
    at writeAfterEnd (/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/node_modules/caterpillar/node_modules/readable-stream/lib/_stream_writable.js:146:12)
    at Logger.Writable.write (/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/node_modules/caterpillar/node_modules/readable-stream/lib/_stream_writable.js:193:5)
    at Logger.log (/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/node_modules/caterpillar/out/lib/caterpillar.js:191:10)
    at Logger.log (/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/node_modules/caterpillar/out/lib/caterpillar.js:3:59)
    at DocPad.log (/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/out/lib/docpad.js:1911:16)
    at DocPad.log (/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/out/lib/docpad.js:4:59)
    at forward (/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/out/lib/docpad.js:2990:14)
    at /Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/out/lib/docpad.js:3Anderss-iMac:techbasics

更新错误

module.js:340
    throw err;
          ^
Error: Cannot find module 'lazy-require'
    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.<anonymous> (/Users/anderskitson/sites/techbasics/node_modules/docpad/out/lib/docpad.js:11: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)
An error occured within the child DocPad instance: exited with a non-zero status code

运行后 sudo npm install -g docpad@6

npm ERR! TypeError: options.uid should be a number
npm ERR!     at ChildProcess.spawn (child_process.js:915:24)
npm ERR!     at exports.spawn (child_process.js:715:9)
npm ERR!     at runCmd_ (/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/npm/lib/utils/lifecycle.js:181:14)
npm ERR!     at /Users/anderskitson/.nvm/v0.10.21/lib/node_modules/npm/lib/utils/lifecycle.js:157:7
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/Users/anderskitson/.nvm/v0.10.21/bin/npm" "install" "-g" "docpad@6"
npm ERR! cwd /Users/anderskitson/sites
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.12

> typechecker@2.0.6 preinstall /Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/node_modules/typechecker
> node ./cyclic.js

npm ERR! TypeError: options.uid should be a number
npm ERR!     at ChildProcess.spawn (child_process.js:915:24)
npm ERR!     at exports.spawn (child_process.js:715:9)
npm ERR!     at runCmd_ (/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/npm/lib/utils/lifecycle.js:181:14)
npm ERR!     at /Users/anderskitson/.nvm/v0.10.21/lib/node_modules/npm/lib/utils/lifecycle.js:157:7
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/Users/anderskitson/.nvm/v0.10.21/bin/npm" "install" "-g" "docpad@6"
npm ERR! cwd /Users/anderskitson/sites
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.12
npm http GET https://registry.npmjs.org/joe
npm http GET https://registry.npmjs.org/joe-reporter-console
npm http GET https://registry.npmjs.org/progress/0.1.0
npm http GET https://registry.npmjs.org/ansistyles
npm http GET https://registry.npmjs.org/ansicolors
npm http GET https://registry.npmjs.org/readable-stream

> taskgroup@3.2.3 preinstall /Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/node_modules/taskgroup
> node ./cyclic.js

npm ERR! TypeError: options.uid should be a number
npm ERR!     at ChildProcess.spawn (child_process.js:915:24)
npm ERR!     at exports.spawn (child_process.js:715:9)
npm ERR!     at runCmd_ (/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/npm/lib/utils/lifecycle.js:181:14)
npm ERR!     at /Users/anderskitson/.nvm/v0.10.21/lib/node_modules/npm/lib/utils/lifecycle.js:157:7
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/Users/anderskitson/.nvm/v0.10.21/bin/npm" "install" "-g" "docpad@6"
npm ERR! cwd /Users/anderskitson/sites
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.12

运行 npm install -g docpad@6

Anderss-iMac:sites anderskitson$ npm install -g docpad@6
npm http GET https://registry.npmjs.org/docpad
npm http 304 https://registry.npmjs.org/docpad
npm ERR! error rolling back Error: EACCES, unlink '/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/.npmignore'
npm ERR! error rolling back  docpad@6.53.4 { [Error: EACCES, unlink '/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/.npmignore']
npm ERR! error rolling back   errno: 3,
npm ERR! error rolling back   code: 'EACCES',
npm ERR! error rolling back   path: '/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/.npmignore' }
npm ERR! Error: EACCES, unlink '/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/.npmignore'
npm ERR!  { [Error: EACCES, unlink '/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/.npmignore']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/.npmignore' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/Users/anderskitson/.nvm/v0.10.21/bin/npm" "install" "-g" "docpad@6"
npm ERR! cwd /Users/anderskitson/sites
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.12
npm ERR! path /Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/.npmignore
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/Users/anderskitson/.nvm/v0.10.21/lib/node_modules/docpad/.npmignore'
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR!  { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/Users/anderskitson/.nvm/v0.10.21/bin/npm" "install" "-g" "docpad@6"
npm ERR! cwd /Users/anderskitson/sites
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.12
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/anderskitson/sites/npm-debug.log
npm ERR! not ok code 0
4

0 回答 0