javascript - Error trying to install grunt -
i installed grunt using code:
npm install -g grunt-cli when run grunt --version returns me version:
grunt-cli v0.1.13 but when go project's folder , run npm install, returns me errors messages:
npm err! install couldn't read dependencies npm err! package.json enoent, open '/applications/xampp/xamppfiles/htdocs/grunt/package.json' npm err! package.json not problem npm itself. npm err! package.json npm can't find package.json file in current directory. npm err! system darwin 11.4.2 npm err! command "node" "/usr/local/bin/npm" "install" npm err! cwd /applications/xampp/xamppfiles/htdocs/grunt npm err! node -v v0.10.26 npm err! npm -v 1.4.3 npm err! path /applications/xampp/xamppfiles/htdocs/grunt/package.json npm err! code enopackagejson npm err! errno 34 npm err! npm err! additional logging details can found in: npm err! /applications/xampp/xamppfiles/htdocs/grunt/npm-debug.log npm err! not ok code 0 what i'm doing wrong? google while , couldn't find answer question, can me?
npm install reads , installs dependencies package.json file , has nothing grunt.
node telling you don't have package.json file.
create package.json running npm init , stepping through process.
to save dependencies package.json file, run
npm install grunt --save-dev
where grunt in above command example of dependency.
also, haven't installed grunt - you've installed grunt command line interface job act interface local grunt installation. haven't installed grunt locally yet (from you've shown).
npm install grunt --save-dev install locally (and save dependency in package.json file)
Comments
Post a Comment