0

操作系统:10.9.2 我正在使用 jhipster 生成器,这似乎是 mac 中 package.json 的问题,我们有什么解决方法吗?

以下是错误:

npm ERR! Error: ENOENT, utime '/Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/hmajumdar/Work/sandbox/jhipster
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/package.json
npm ERR! fstream_path /Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/readable-stream/package.json
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call utimes
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, utime '/Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/hmajumdar/Work/sandbox/jhipster
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/package.json
npm ERR! fstream_path /Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits/package.json
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call utimes
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 304 https://registry.npmjs.org/promised-io
npm http GET https://registry.npmjs.org/win-spawn
npm ERR! Error: ENOENT, lstat '/Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/hmajumdar/Work/sandbox/jhipster
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/package.json
npm ERR! fstream_path /Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/typedarray/package.json
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 304 https://registry.npmjs.org/uuid
npm http GET https://registry.npmjs.org/get-urls
npm http 304 https://registry.npmjs.org/astral-pass
npm http GET https://registry.npmjs.org/decompress
npm http GET https://registry.npmjs.org/get-stdin
npm ERR! Failed to parse json
npm ERR! Unexpected end of input
npm ERR! File: /Users/hmajumdar/.npm/tape/0.2.2/package/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR! 
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/hmajumdar/Work/sandbox/jhipster
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! file /Users/hmajumdar/.npm/tape/0.2.2/package/package.json
npm ERR! code EJSONPARSE
npm http 304 https://registry.npmjs.org/win-spawn
npm http 304 https://registry.npmjs.org/get-urls
npm http 304 https://registry.npmjs.org/decompress
npm http 304 https://registry.npmjs.org/get-stdin
npm http GET https://registry.npmjs.org/object-keys
npm ERR! Error: ENOENT, lstat '/Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/output.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/hmajumdar/Work/sandbox/jhipster
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/output.js
npm ERR! fstream_path /Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/output.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)




1910 error error rolling back Error: ENOTEMPTY, rmdir '/Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits'
1910 error error rolling back  grunt-contrib-cssmin@0.9.0 { [Error: ENOTEMPTY, rmdir '/Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits']
1910 error error rolling back   errno: 53,
1910 error error rolling back   code: 'ENOTEMPTY',
1910 error error rolling back   path: '/Users/hmajumdar/Work/sandbox/jhipster/node_modules/grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/concat-stream/node_modules/inherits' }
1911 error Failed to parse json
1911 error Unexpected end of input
1912 error File: /Users/hmajumdar/.npm/tape/0.2.2/package/package.json
1913 error Failed to parse package.json data.
1913 error package.json must be actual JSON, not just JavaScript.
1913 error
1913 error This is not a bug in npm.
1913 error Tell the package author to fix their package.json file. JSON.parse
1914 error System Darwin 13.1.0
1915 error command "node" "/usr/local/bin/npm" "install"
1916 error cwd /Users/hmajumdar/Work/sandbox/jhipster
1917 error node -v v0.10.28
1918 error npm -v 1.4.9
1919 error file /Users/hmajumdar/.npm/tape/0.2.2/package/package.json
1920 error code EJSONPARSE
1921 verbose exit [ 1, true 
4

1 回答 1

0

我认为这是由于我的机器上安装了 NPM 的方式,我清除了一些缓存并重新安装了 npm。那解决了它。

于 2014-06-12T18:49:49.400 回答