purple-force / docsite

An opensource static website generator
https://docsite.js.org
MIT License
1.51k stars 234 forks source link

docsite是否支持cnetos7离线安装 #51

Closed zhanen closed 4 years ago

zhanen commented 5 years ago

离线安装成功之后,但是执行 docsite init 命令的时候还是会访问https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node 这个下载地址,内部服务器无法联网,安装时用nexus的npm仓库安装的。并且我已经全局安装了node-sass。请问安装后 支持离线初始化吗?【adm@C111908191 docsitedemo]$ `docsite init ? Which directory should the project initialized in? . Project folder was created successfully. npm WARN deprecated babel-preset-es2015@6.22.0: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update! npm WARN deprecated gulp-util@2.2.20: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated extract-text-webpack-plugin@2.1.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart() npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x. npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor. npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js npm WARN tarball tarball data for jsx-ast-utils@^2.1.0 (sha1-TUlz6/i50oN+6RqCCMxm86J3bPs=) seems to be corrupted. Trying one more time.

node-sass@4.12.0 install /data/web/docsitedemo/node_modules/node-sass node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node Cannot download "https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node":

ETIMEDOUT

Timed out attemping to establish a remote connection`

zhanen commented 5 years ago

执行 docsite start 报错了。init已经解决 报错信息如下:[sysadm@C111908191 demo]$ docsite start (node:63851) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir '/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/vendor' at Object.readdirSync (fs.js:790:3) at Object.getInstalledBinaries (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/extensions.js:131:13) at foundBinariesList (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:20:15) at foundBinaries (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:15:5) at Object.module.exports.missingBinary (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:45:5) at module.exports (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/binding.js:15:30) at Object.<anonymous> (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/index.js:14:35) at Module._compile (internal/modules/cjs/loader.js:778:30) at Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Object.require.extensions.(anonymous function) [as .js] (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/babel-register/lib/node.js:152:7) (node:63851) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not h

ghw commented 5 years ago

执行 docsite start 报错了。init已经解决 报错信息如下:[sysadm@C111908191 demo]$ docsite start (node:63851) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir '/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/vendor' at Object.readdirSync (fs.js:790:3) at Object.getInstalledBinaries (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/extensions.js:131:13) at foundBinariesList (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:20:15) at foundBinaries (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:15:5) at Object.module.exports.missingBinary (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/errors.js:45:5) at module.exports (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/binding.js:15:30) at Object.<anonymous> (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/node-sass/lib/index.js:14:35) at Module._compile (internal/modules/cjs/loader.js:778:30) at Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Object.require.extensions.(anonymous function) [as .js] (/data/app/nodejs/node_global/lib/node_modules/docsite/node_modules/babel-register/lib/node.js:152:7) (node:63851) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not h

你去搞个nvm环境,然后去替他系统拷贝个安好的,你那个还是node-sass的锅,第一个问题是怎么解决掉的?

purple-force commented 5 years ago

docsite init除了初始化模板,还会进行依赖的安装。问题是node-sass的不同版本需要去下载一个绑定包。你试着在项目下执行npm start试试,项目本地也安装了一个docsite。