Skip to content
Sign upLog in
← Back to Community
Please verify that the package.json has a valid "main" entry
Profile icon
Squirrel777

So I am making an npm package for Nodejs that is just a Captcha. And so I had to update the package because I added a function. So when I tried to run it in my other repl, this error popped up:

image

Why is this happening and how can I solve it?

Voters
Profile icon
Squirrel777
Comments
hotnewtop
Profile icon
Coder100

In your package.json:

{ "name": "mailcaptcha", "version": "1.0.5", /* there is no "main"! */ "description": "A captcha that makes everything easier!", "main": "easyCaptcha.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Squirrel777", "license": "MIT" }
Profile icon
Coder100

lol just do npm init and it'll be fine.

Profile icon
Squirrel777

@Coder100
I already did that

Profile icon
Coder100

it looks to me you haven't

@Squirrel777

Profile icon
Coder100

@Squirrel777

image
as you can see in your captcha folder, you have it just fine, but in your root, you don't.