New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm link无效 #78
Comments
我自己在本地试了一下,是可以正常工作的。 工作目录:
// package.json
{
"name": "linker",
"version": "1.0.0",
"description": "npm link test",
"main": "index.mjs",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {}
}
// index.mjs
export function add(a, b) {
return a + b;
}
import { add } from 'linker';
const ret = add(1, 2);
console.log(ret);
结果如下: 请问你在 |
感谢,已解决,当前项目选用版本后,需要将该版本放入系统path中。 |
感谢你的回复,不过经过本地测试这确实是一个bug。 在执行 我先把这个 |
目前在最新的 Release v3.3.0 中已经修复了这个问题,支持 npm 的 那么我就先将此 |
自己写了一个脚手架test-cli,用npm link到全局,npm ls -g 中存在test-cli,但是执行test-cli无效,无法将“test-cli”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再
试一次。。另外一台电脑直接安装官方node版本包,测试结果是正常的。
The text was updated successfully, but these errors were encountered: