Giter VIP home page Giter VIP logo

Comments (6)

hamishwillee avatar hamishwillee commented on July 24, 2024 1

There's another one a bit further up, right below the "package.json" header", that's outdated.

Nope, that's the output generated by the application generator, as stated in the docs. What I am thinking of doing though is moving the instructions to patch this higher up so the text matches.

So the idea here is that they generate most of the code framework using the application generator. In the past the app gen was pretty close to current, so the slight difference in versions didn't matter. Now it does.

I wouldn't really recommend copy/pasting package.json. Running npm install everything you need sounds easier.

Probably not. The package file is generated by the application generator, and not all values are done with ^. So if you do update you only get a semantic update in the current minor.patch version.

In any case I actually want to fix the versions used so that I can choose when to update them. Why? Because that means this doesn't get broken whenever there is a big update - or at least the code runs for the listed dependencies.

Of course you're right as a general thing, but I've been maintaining this since I wrote it, and every time adding more flexibility to dependencies makes the cost of maintenance higher.

from content.

Josh-Cena avatar Josh-Cena commented on July 24, 2024

If you are using npm, what's your output of npm ls acorn?

from content.

ajaffary avatar ajaffary commented on July 24, 2024
[email protected] /Users/abbas/Documents/code/express/express-locallibrary-tutorial
└─┬ [email protected]
  ├─┬ [email protected]
  │ └─┬ [email protected]
  │   ├─┬ [email protected]
  │   │ └── [email protected] deduped
  │   └── [email protected]
  └─┬ [email protected]
    └─┬ [email protected]
      └── [email protected]

from content.

Josh-Cena avatar Josh-Cena commented on July 24, 2024

Thanks, @hamishwillee it looks the package versions specified in the tutorial are outdated—maybe it's time for a rewrite? :)

from content.

hamishwillee avatar hamishwillee commented on July 24, 2024

@Josh-Cena Yee of little faith. The dependencies were updated a week or so ago to match the very latest :-). I'd been trying not to do this because this uses the express application generator and I wanted to match that tools default output as much as possible to ease the job for developers.

@ajaffary Was probably unlucky enough to do the skeleton creation before then, which is why they look old. However that shouldn't be the cause of this problem since nothing else changed other than the dependencies, and they worked both before and after with no other changes.

@ajaffary The text that changed last week was in https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/skeleton_website#package.json - near the end:

image

Did you create the skeleton before last week? If not, that tells me I probably need to make this more visible.

In any case, can you rebuild with those dependencies and see what happens.

As I say though, I don't think that is the cause (though it may be). The worked project that was created by going through this tutorial is here: https://github.com/mdn/express-locallibrary-tutorial

It won't precisely match yours, but you should be able to compare and see if there are any obvious differences - and make sure your dependencies match?

from content.

Josh-Cena avatar Josh-Cena commented on July 24, 2024

There's another one a bit further up, right below the "package.json" header", that's outdated.

I wouldn't really recommend copy/pasting package.json. Running npm install everything you need sounds easier.

from content.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.