您好,我正在制作我的第一个 npm 包,名为 easy-discordjs,但是当我在主模块文件夹和测试模块文件夹中执行 npm 链接时,它会出错。
npm link easier-discordjs
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/easier-discordjs - Not found
npm ERR! 404 'easier-discordjs@*' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\niels\AppData\Local\npm-cache\_logs\2021-06-22T15_59_17_982Z-debug.log
我的主模块的 index.js 是这样的:
module.exports = (name) => {
return `Hello ${name}!`;
};
我的测试模块的 index.js 是这样的:
const greeter = require('easier-discordjs');
console.log(greeter('Niels'))
我不知道该怎么办。