降级解析服务器

时间:2018-09-24 19:39:19

标签: parse-server downgrade

我一直在尝试2个小时,试图将Parse Server从3.0.0降级到2.8.4,但每次都失败!

我将其从package.json更改为npm install,转到仪表板,仍然是:server version 3.0.0

以下是安装日志:

npm install
npm WARN deprecated uws@10.148.1: stop using this version
parse-server-example@1.4.0 /root/parse-server-example
├─┬ parse-dashboard@1.2.0
│ └─┬ express@4.16.3
│   ├── array-flatten@1.1.1 
│   ├── encodeurl@1.0.2 
│   ├─┬ finalhandler@1.1.1
│   │ └── encodeurl@1.0.2 
│   ├─┬ send@0.16.2
│   │ └── encodeurl@1.0.2 
│   └─┬ serve-static@1.13.2
│     └── encodeurl@1.0.2 
└─┬ parse-server@2.8.4 
  ├─┬ @parse/push-adapter@3.0.0-alpha2
  │ └─┬ parse@1.11.1 
  │   └─┬ ws@3.3.3 
  │     └── ultron@1.1.1 
  ├── @parse/simple-mailgun-adapter@1.0.2 
  ├── commander@2.16.0 
  ├─┬ express@4.16.2
  │ ├── array-flatten@1.1.1 
  │ └── encodeurl@1.0.2 
  ├── lru-cache@4.1.2 
  ├─┬ mongodb@3.1.1 
  │ └─┬ mongodb-core@3.1.0 
  │   └── bson@1.0.9 
  ├─┬ parse@1.11.1 
  │ └─┬ ws@3.3.3 
  │   └── ultron@1.1.1 
  └── request@2.85.0 

npm ERR! Linux 4.15.0-34-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! path /root/parse-server-example/node_modules/.staging/node-pre-gyp-49f396d5
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename '/root/parse-server-example/node_modules/.staging/node-pre-gyp-49f396d5' -> '/root/parse-server-example/node_modules/bcrypt/node_modules/node-pre-gyp'
npm ERR! enoent ENOENT: no such file or directory, rename '/root/parse-server-example/node_modules/.staging/node-pre-gyp-49f396d5' -> '/root/parse-server-example/node_modules/bcrypt/node_modules/node-pre-gyp'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /root/parse-server-example/npm-debug.log

我该怎么办?

1 个答案:

答案 0 :(得分:0)

绝对不要在未查看要删除的内容并了解是否可以的情况下运行此命令,而是尝试执行rm -rf <path>/node_modules/*。也许要等一两个评论。严重的是,不要只是随机地执行rm -rf命令,因为互联网上有人告诉您这样做。

但是在这种情况下,您可以删除node_modules和package-lock.json(如果存在),然后运行npm install来重新安装package.json中的内容。 / p>

严重的是,绝对不要这样做,直到您查看正在执行的操作并确认它可以。

package-lock.json跟踪您使用的模块版本中的更改。在npm install上将node_modules安装所有模块。当您运行命令时,它将检查您的node_modules与package.json,以查看是否有符合您条件的最新版本。知道为什么它不会降级,但是如果您的package.json设置正确,则应该重新安装它,并且应该正常工作。

请您自担风险。

相关问题