question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Managing Packages with Npm - How to Use package.json, the Core of Any Node.js Project or npm Package

See original GitHub issue

Describe your problem and - if possible - how to reproduce it

In Introduction to the Managing Packages with npm Challenges it says to click the following link to create a glitch project for the following lessons:

https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-npm

or to clone the following repository:

https://github.com/freeCodeCamp/boilerplate-npm/

I did both and tried both for the next lesson How to Use package.json, the Core of Any Node.js Project or npm Package.

Cloning the repo and changing it just flat out doesn’t work. Here’s my repo on Github. If I put a link to my repo and submit the challenge, it fails with the message “package.json should have a valid “author” key” and this in the console:

download

it looks like the test is adding api into the filename and not even finding the package.json.

The issue with glitch is a bit trickier. It works fine on Firefox. However, if you use the original link at the start of the npm lessons to create your glitch project on Chrome, instead of getting a clone of the FCC project as your starter project, you get the base glitch app as your starter project. And, it doesn’t work for the tests. (This is the app I got, https://flashy-paperback.glitch.me, it’s not the FCC starter)

Note: If you originally create the Glitch app by clicking the “click here” on Chrome, the app that is created won’t work for submitting lessons regardless of browser. You have to actually “click here” on Firefox, then you get a Glitch project that will work for the lessons in Firefox or Chrome.

Note that the Chrome issue might be more a Glitch issue with Chrome on Manjaro, for some reason Glitch runs super-slow, lags out, and crashes on Chrome for me.

Add a Link to the page with the problem

Tell us about your browser and operating system

  • Browser Name: Chrome
  • Browser Version: Version 66.0.3359.181 (Official Build) (64-bit)
  • Operating System: Manjaro Linux 17.1.10

If possible, add a screenshot here

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

24reactions
darkbyte7commented, Jul 31, 2018

Hi @P1xt , @anku255 I found a work around for the GitHub instructions. One can first create a feature branch named _api, make the required changes in package.json. Then navigate to the modified package.json and click on raw format. Copy the url for the raw format. In my case, it is _https://raw.githubusercontent.com/mihir-mahakalkar/boilerplate-npm/_api/package.json_. The last step is to delete /_api/package.json string from the above url, and then paste it in the challenge input field. In my case, it should be _https://raw.githubusercontent.com/mihir-mahakalkar/boilerplate-npm_

4reactions
hollidayericcommented, Aug 30, 2020

@Sky020 - Thank you! I still had trouble with https://boilerplate-npm.hollidayeric.repl.run. I opened the editor in a new window and noticed the link is slightly different for the program. It is running and works to submit the lessons with this link: https://boilerplate-npm.hollidayeric.repl.co

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use package.json, the Core of Any Node.js Project or ...
You first need to run npm install in the console unless you already see a package-lock.json . Then click the Run button to...
Read more >
How to Use package.json, the Core of Any Node.js ... - GitHub
The package.json file is the center of any Node.js project or npm package. It stores information about your project, similar to how the...
Read more >
How To Use Node.js Modules with npm and package.json
First, set up a project so you can practice managing modules. In your shell, create a new folder called locator : mkdir locator....
Read more >
package.json - npm Docs
Therefore, the name can't contain any non-URL-safe characters. Some tips: Don't use the same name as a core Node module. Don't put "js"...
Read more >
Modules: Packages | Node.js v19.3.0 Documentation
In a package's package.json file, two fields can define entry points for a package: "main" and "exports" . Both fields apply to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found