SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trouble with editing package.json file according to the book.

    I'm fairly new to Mac OSx in general and I'm trying to go through the Jump Start Node.js book on a Mac. I've got node installed just fine and I'm at the part where I am supposed to edit the package.json file. I'm having some difficulty here. First, which package.json file am I supposed to edit? On my system I have several of these. Second, am I supposed to delete everything that's in the file and just put in what the book says or do I simply add the information provided in the book to the end of the file?

    Any help would be greatly appreciated.

    Thanks

  2. #2
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind, I figured it out.

  3. #3
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cant edit package.json

    Quote Originally Posted by Seanmyr View Post
    I'm fairly new to Mac OSx in general and I'm trying to go through the Jump Start Node.js book on a Mac. I've got node installed just fine and I'm at the part where I am supposed to edit the package.json file. I'm having some difficulty here. First, which package.json file am I supposed to edit? On my system I have several of these. Second, am I supposed to delete everything that's in the file and just put in what the book says or do I simply add the information provided in the book to the end of the file?

    Any help would be greatly appreciated.

    Thanks
    Hi all
    I actually have the indentical problem to Seanmyr im new to the Nodejs approach to web development and im trying to follow along with the book jumpstart nodejs and i have tried to edit the package.json file under windows 7 here is the file path

    C:\Program Files\nodejs\node_modules\npm

    i tried to use notepad and notepad++ and when i finish editing it and i try to save it, it says i am unable to do so due to the file being used by another program or i dont have access to the file.

    Maybe im using the wrong file but i cant see any other files that match package.json

    Any ideas on what im doing wrong ?

    Thanks in advance

  4. #4
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its ok i figured it out
    Simply right click on your package.json file and open propeties then -> security -> edit then tick the box that allows you to do write privileges for the user level you are on . cliclk apply and ok and then you can edit the file according to the book.

  5. #5
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Glee02 View Post
    Hi all
    I actually have the indentical problem to Seanmyr im new to the Nodejs approach to web development and im trying to follow along with the book jumpstart nodejs and i have tried to edit the package.json file under windows 7 here is the file path

    C:\Program Files\nodejs\node_modules\npm
    That would be your global package.json file I think.

    When the book refers to editing the package.json file, it is referring to the one in the directory in which you are currently working; i.e. the directory where your nockmarket.js is located. For example, for me it's C:\JumpStartNodeJS\Chapter01\package.json
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •