I want to start publishing npm packages to a scope. Do I need to register as a user with the scope as my user name? Example if I create a package like this:
ole@MKI:~/firstpackage$ npm init
Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
name: (firstpackage) @npmtestscope/firstpackage
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to /home/ole/deletethis/package.json:
{
"name": "@npmtestscope/firstpackage",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Is this ok? (yes)
ole@MKI:~/firstpackage$ touch README.md
ole@MKI:~/firstpackage$ npm publish
This is the result:
npm ERR! 404 Scope not found : @npmtestscope/firstpackage
So what do I need to do in order for npm to find the scope?
--access public
flag when you publish for the first time. – Bolingbrokenpm publish --access public
. – Nightly