Giter Site home page Giter Site logo

Comments (12)

dhcodes avatar dhcodes commented on August 22, 2024 25

@amirghafouri I posted this over on FCC but thought you might find it helpful to:

I went back to look through this as I originally stopped at the dist-tag step. Turns out, it does work but is very picky. See the post here from wayback regarding this issue: #758

I recommend going back to the "Start A Project" step, and redoing npm init as my package did not have my username in the name: area of the package.json. When I was getting the error you got, the name was "fccproject", but when I re-did npm init, it changed it to @dhcodes/fccproject. I was then able to re-run the publish step. For the version step, as noted in #758, be sure to add a new version number (ex. npm version 1.0.x where x is incremented +1) even though the directions aren't clear on this. Then verify and do publish again. And verify that.

Finally, when dealing with the dist-tag, know that the syntax should be: npm dist-tag add @yourusername/[email protected] test where you change it to match your username and your pkg name and change x to be your version number from publish, NOT publish again--since you can't add a dist-tag to the latest release. To confirm the details of your pkg, you can run npm ls to see your username and package name.

Lastly, npm dist-tag ls can help with the task to remove dist-tags. Best of luck!

from how-to-npm.

JohnnyBizzel avatar JohnnyBizzel commented on August 22, 2024 11

After several attempts now I am giving up. As a beginner tutorial this is terrible. If you have to do all the steps suggested by @dhcodes just to get though it, is it worth it? So far I haven't found any help on Stack Overflow or Cloud 9. To be honest I am just going round and round in circles. Please consider improving this challenge.
I'm stuck at trying to re-publish even after changing the version number.

from how-to-npm.

Croasdell avatar Croasdell commented on August 22, 2024 4

Hello all

this will help all of you find your own correct details so you can complete this section simply use the following

npm ls dist-tag
this will list your dist-tag info and then just use this in you command

enjoy :)

from how-to-npm.

ChaturvediSulabh avatar ChaturvediSulabh commented on August 22, 2024 4

So, the key is to find what tags do you have on your package to do so follow as mentioned below
ec2-user: $ npm dist-tag ls
latest: 1.1.0
Now, as I know that i have tag=latest on my package version 1.1.0. So, let me go and remove latest tag from my package
ec2-user:$ npm dist-tag rm PKG latest
-latest: pkg@version
latest is now pointing to 1.2.0 package version which I had simply updated in package.json file version tag
verify and all set
ec2-user: $ how-to-npm verify

Congratulations!  You're a dist-tagging pro!

Run `how-to-npm` to move on to the next exercise.

from how-to-npm.

ashleygwilliams avatar ashleygwilliams commented on August 22, 2024

from @denmnch in #21 I spent some more time with this and narrowed it down. The real issue for most users experiencing problems with this portion of the tutorial is a misunderstanding of how versions are created and published and how dist-tags relate to them.

If you make a mistake, e.g., trying to apply a dist-tag to a version number that hasn't been published, the app throws up errors and ceases to work as expected. The solution is to run how-to-npm again and, if necessary, repeat the previous step (or steps).

In other words, you may need to go back two steps to use npm version patch (or similar) and note the version number. Then publish that version. Then use the correct syntax to add a dist-tag to the newly published version.

If you follow those steps the tutorial works perfectly. But it will continue to throw errors and fail to add dist-tags if you make a mistake or if you attempt to do certain actions on steps other than those on which they are being tested.

from how-to-npm.

ashleygwilliams avatar ashleygwilliams commented on August 22, 2024

freeCodeCamp/freeCodeCamp#758

from how-to-npm.

profoundhub avatar profoundhub commented on August 22, 2024

Finally figured it out, it was silly and tricky and buggy and ... sigh!

from how-to-npm.

boriskogan81 avatar boriskogan81 commented on August 22, 2024

Well, could you explain for the rest of us?

from how-to-npm.

amirghafouri avatar amirghafouri commented on August 22, 2024

Reviewed denmch's posts and still having trouble.

I've tried

aghafour:~/workspace/how-to-npm (master) $ npm dist-tag add [email protected] [buggy]

which gives

npm ERR! Linux 4.2.0-c9
npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.4.5/bin/node" "/home/ubuntu/.nvm/versions/node/v4.4.5/bin/npm" "dist-tag" "add" "[email protected]" "[buggy]"
npm ERR! node v4.4.5
npm ERR! npm  v3.10.3
npm ERR! code E404

npm ERR! 404 missing : -/package/fcc-learning/dist-tags

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/workspace/how-to-npm/npm-debug.log

I've also tried variations of the initial command, the corresponding dist-tag ls command (which returns same errors), going back and redoing the publish and republish levels, making sure that the version I'm trying to do isn't the latest, and adding a "dist-tags" property of "buggy" to my package.json object (total hail mary based off the ERR! 404 missing: from above)

how-to-npm verify skip isn't working either. Can anyone help me?

from how-to-npm.

makstheimba avatar makstheimba commented on August 22, 2024

I had the same error and managed to complete this challenge after starting over and redoing all steps, only thing that changed is a package name - it became @/. Also if I ever did mistake on a how-to-npm challenge I'd rerun it. That's what worked for me.

from how-to-npm.

swyxio avatar swyxio commented on August 22, 2024

for future people encountering this issue, i had it too and zach from nodeschool/discussions#995 helped. just be crystal clear what the name of the project is. and yes really add your @username because their documentation sucks.

from how-to-npm.

profoundhub avatar profoundhub commented on August 22, 2024

is this closed?

from how-to-npm.

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.