Skip to content
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 install编译报错, #20

Open
1195002442 opened this issue Dec 5, 2019 · 14 comments
Open

npm install编译报错, #20

1195002442 opened this issue Dec 5, 2019 · 14 comments

Comments

@1195002442
Copy link

image

@1195002442
Copy link
Author

404 Not Found: [email protected],安装taro-navigationbar这个说和项目同名,项目名称改完之后还是报这个错误,为什么呢

@1195002442 1195002442 reopened this Dec 5, 2019
@lingxiaoyi
Copy link
Owner

你把装好的包删了 再装新的试试

@beibeiaiwuhao
Copy link

这个错误解决了吗?我也是执行 npm i 报错

@beibeiaiwuhao
Copy link

16680 error code E404
16681 error 404 Not Found - GET https://cnpmjs.oss-ap-southeast-1.aliyuncs.com/taro-navigationbar/-/taro-navigationbar-1.0.2.tgz
16682 error 404
16683 error 404 '[email protected]' is not in the npm registry.
16684 error 404 You should bug the author to publish it (or use the name yourself!)
16685 error 404 It was specified as a dependency of 'Taro-navigation-bar-master'
16686 error 404 Note that you can also install from a
16687 error 404 tarball, folder, http url, or git url.
16688 verbose exit [ 1, true ]

@lingxiaoyi
Copy link
Owner

我这里安装一点问题都没有啊,你找一个新文件夹试试,还是因为你这个cnpm的问题

@beibeiaiwuhao
Copy link

我试试的

@beibeiaiwuhao
Copy link

$ npm install [email protected] --registry=https://registry.npm.taobao.org
npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected]
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/haohao/.npm/_logs/2019-12-13T11_25_25_950Z-debug.log

@beibeiaiwuhao
Copy link

还是报错。。。

@lingxiaoyi
Copy link
Owner

npm install taro-navigationbar 直接这样装啊

@beibeiaiwuhao
Copy link

npm install taro-navigationbar
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "taro-navigationbar" under a package
npm ERR! also called "taro-navigationbar". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/haohao/.npm/_logs/2019-12-13T11_27_04_751Z-debug.log

@beibeiaiwuhao
Copy link

也是一样的错

@lingxiaoyi
Copy link
Owner

problem cause when name of project in package.json is similar with name module.

To solve please change project name in package.json to other. example "jsonfile-test"

{
"name": "jsonfile-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
}
}

@beibeiaiwuhao
Copy link

好的,谢谢哈🙏

@ghost
Copy link

ghost commented Dec 13, 2019

我记得后来就是直接把它当做组件用了,没有单独运行,也没有安装,似乎就可以了
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants