当尝试从Github直接安装zeit / nextjs时,它失败并出现以下异常。
我在docker实例中运行时直接在osx中运行同样的错误,并且在Node 5.2和7.2上都会出现相同的错误。我第一次直接从GitHUB安装,所以我不知道我是否遗漏了一些重要的东西?
修改的
npm install next
按预期工作,但不包含Docker
所需的最新package.json结束编辑
此致 的Mattias
root@2cc7a4204924:/usr/src# npm install git+https://github.com/zeit/next.js
.
.
.
.... lots of other packages installing fine .....
.
.
.
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "git+https://github.com/zeit/next.js"
npm ERR! node v7.2.0
npm ERR! npm v3.10.9
npm ERR! path /usr/src/node_modules/next/dist/bin/next
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/src/node_modules/next/dist/bin/next'
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/src/node_modules/next/dist/bin/next'
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! /usr/src/npm-debug.log
答案 0 :(得分:2)
不确定为什么它不能从github工作但你可以这样做从npm安装最新的测试版:
npm i --save next@^2.0.0-beta
答案 1 :(得分:0)
按名称安装软件包安装它就好了但是通过github它会抛出错误。它一定是Github当前版本的问题。
npm i next // works
npm i zeit/next.js // doesn't work