我正在尝试使用此简单工具,并按照此处的说明进行本地构建:https://github.com/jlblcc/json-schema-viewer
我所做的是:
npm -g install bower
bower install
npm install
然后我尝试使用 grunt dev 构建它,但是它抱怨我没有安装sass和ruby。所以我做到了:
npm -g install sass
npm -g install ruby
我再次尝试使用 grunt dev ,在控制台中出现错误:
Running "env:dev" (env) task
Running "sass:dev" (sass) task
Could not find an option named "cache".
Usage: sass <input.scss> [output.css]
sass <input.scss>:<output.css> <input/>:<output/>
=== Input and Output ===================
--[no-]stdin Read the stylesheet from stdin.
--[no-]indented Use the indented syntax for input from stdin.
-I, --load-path=<PATH> A path to use when resolving imports.
May be passed multiple times.
-s, --style=<NAME> Output style.
[expanded (default), compressed]
--update Only compile out-of-date stylesheets.
=== Source Maps ========================
--[no-]source-map Whether to generate source maps.
(defaults to on)
--source-map-urls How to link from source maps to source files.
[relative (default), absolute]
--[no-]embed-sources Embed source file contents in source maps.
--[no-]embed-source-map Embed source map contents in CSS.
=== Other ==============================
--watch Watch stylesheets and recompile when they change.
--[no-]poll Manually check for changes rather than using a native watcher.
Only valid with --watch.
--[no-]stop-on-error Don't compile more files once an error is encountered.
-i, --interactive Run an interactive SassScript shell.
-c, --[no-]color Whether to emit terminal colors.
-q, --[no-]quiet Don't print warnings.
--[no-]trace Print full Dart stack traces for exceptions.
-h, --help Print this usage information.
--version Print the version of Dart Sass.
Warning: Exited with error code 64 Use --force to continue.
Aborted due to warnings.
最后我尝试了 grunt dev --force ,它说:
Running "env:dev" (env) task
Running "sass:dev" (sass) task
Could not find an option named "cache".
Usage: sass <input.scss> [output.css]
sass <input.scss>:<output.css> <input/>:<output/>
=== Input and Output ===================
--[no-]stdin Read the stylesheet from stdin.
--[no-]indented Use the indented syntax for input from stdin.
-I, --load-path=<PATH> A path to use when resolving imports.
May be passed multiple times.
-s, --style=<NAME> Output style.
[expanded (default), compressed]
--update Only compile out-of-date stylesheets.
=== Source Maps ========================
--[no-]source-map Whether to generate source maps.
(defaults to on)
--source-map-urls How to link from source maps to source files.
[relative (default), absolute]
--[no-]embed-sources Embed source file contents in source maps.
--[no-]embed-source-map Embed source map contents in CSS.
=== Other ==============================
--watch Watch stylesheets and recompile when they change.
--[no-]poll Manually check for changes rather than using a native watcher.
Only valid with --watch.
--[no-]stop-on-error Don't compile more files once an error is encountered.
-i, --interactive Run an interactive SassScript shell.
-c, --[no-]color Whether to emit terminal colors.
-q, --[no-]quiet Don't print warnings.
--[no-]trace Print full Dart stack traces for exceptions.
-h, --help Print this usage information.
--version Print the version of Dart Sass.
Warning: Exited with error code 64 Used --force, continuing.
Running "preprocess:dev" (preprocess) task
Done, but with warnings.
最后,我尝试使用以下主机进行托管: grunt connect:server:keepalive ,然后当我进入http://localhost:9001时,它说无法获取/prod/0.3.4/ 20180725/1 / 。我该如何解决?预先感谢!