老师,git pull后npm源安装错误

来源:12-3 发布流程及发布脚本的开发

TheBayMax

2017-10-12

git  pull后

Tom@Tom-PC MINGW64 ~/Desktop
$ ssh root@101.132.140.8
root@101.132.140.8's password:
Last login: Thu Oct 12 10:14:31 2017 from 124.74.107.114

Welcome to Alibaba Cloud Elastic Compute Service !

[root@iZuf6c3lh54r8qj8l3o6zlZ ~]# cd /developer/git-repository/
[root@iZuf6c3lh54r8qj8l3o6zlZ git-repository]# ls
51maipai
[root@iZuf6c3lh54r8qj8l3o6zlZ git-repository]# cd 51maipai/maipai
-bash: cd: 51maipai/maipai: No such file or directory
[root@iZuf6c3lh54r8qj8l3o6zlZ git-repository]# cd 51maiapi/
-bash: cd: 51maiapi/: No such file or directory
[root@iZuf6c3lh54r8qj8l3o6zlZ git-repository]# cd 51maiapi
-bash: cd: 51maiapi: No such file or directory
[root@iZuf6c3lh54r8qj8l3o6zlZ git-repository]# cd 51maipai/
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]# git pull
remote: Counting objects: 31, done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 31 (delta 12), reused 0 (delta 0)
Unpacking objects: 100% (31/31), done.
From gitee.com:wymaipai/51maipai
   b198dee..a7f8f95  51maipai_v1.0 -> origin/51maipai_v1.0
Already up-to-date.
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]#
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]#
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]#
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]# ls
README.md
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]# ls -al
total 20
drwxr-xr-x 3 root root 4096 Oct 12 10:47 .
drwxrwxr-x 3 root root 4096 Oct 12 10:47 ..
drwxr-xr-x 8 root root 4096 Oct 12 11:37 .git
-rw-r--r-- 1 root root   32 Oct 12 10:47 .gitignore
-rw-r--r-- 1 root root   20 Oct 12 10:47 README.md
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]# git branch
* master
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]# ls -al
total 20
drwxr-xr-x 3 root root 4096 Oct 12 10:47 .
drwxrwxr-x 3 root root 4096 Oct 12 10:47 ..
drwxr-xr-x 8 root root 4096 Oct 12 11:37 .git
-rw-r--r-- 1 root root   32 Oct 12 10:47 .gitignore
-rw-r--r-- 1 root root   20 Oct 12 10:47 README.md
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]# git pull
Already up-to-date.
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]# ls
README.md
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]# ls -al
total 20
drwxr-xr-x 3 root root 4096 Oct 12 10:47 .
drwxrwxr-x 3 root root 4096 Oct 12 10:47 ..
drwxr-xr-x 8 root root 4096 Oct 12 12:00 .git
-rw-r--r-- 1 root root   32 Oct 12 10:47 .gitignore
-rw-r--r-- 1 root root   20 Oct 12 10:47 README.md
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]#
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]# npm install --registory=https://registory.npm.taobao.org
npm ERR! install Couldn't read dependencies
npm ERR! Linux 2.6.32-696.6.3.el6.x86_64
npm ERR! argv "/usr/local/node-v4.4.7-linux-x64/bin/node" "/usr/local/node-v4.4.7-linux-x64/bin/npm" "install" "--registory=https://regist                                                                                                                                                                                                                                 ory.npm.taobao.org"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! path /developer/git-repository/51maipai/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR! syscall open

npm ERR! package.json ENOENT: no such file or directory, open '/developer/git-repository/51maipai/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! Please include the following file with any support request:
npm ERR!     /developer/git-repository/51maipai/npm-debug.log
[root@iZuf6c3lh54r8qj8l3o6zlZ 51maipai]#


写回答

1回答

Rosen

2017-10-12

你这新项目,什么都没有,install就出错了

0
2
Rosen
回复
TheBayMax
如果写过代码了,检查下分支,要是刚开始弄就从npm init开始
2017-10-17
共2条回复

真实数据对接 从0开发前后端分离的企业级上线项目

【毕设项目精品】前端实战,对接真实服务端数据,开发完整项目

4268 学习 · 4120 问题

查看课程