【发布时间】:2021-11-10 08:42:04
【问题描述】:
我在使用命令行编译过程 sass 时遇到问题,我使用 npm.js,我正在尝试学习 scss。
任何帮助将不胜感激,这是文件 package.json
代码下面的问题{
"name": "yes",
"version": "1.0.0",
"description": "guitar website",
"main": " ",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"sass": "node-sass sass/main.scss css/style.css -w",
"server": "live-server --browser=chrome",
"start": "npm-run-all --parallel server sass"
},
"author": "",
"license": "ISC",
"dependencies": {
"node-sass": "^6.0.1",
"npm-run-all": "^4.1.5"
}
}
终端显示此错误:
User@DESKTOP-JKP464G MINGW64 ~/Desktop/learn with elzero/template 3 html scss
$ npm run start
> yes@1.0.0 start C:\Users\User\Desktop\learn with elzero\template 3 html scss
> npm-run-all --parallel server sass
> yes@1.0.0 server C:\Users\User\Desktop\learn with elzero\template 3 html scss
> live-server --browser=chrome
> yes@1.0.0 sass C:\Users\User\Desktop\learn with elzero\template 3 html scss
> node-sass sass/main.scss css/style.css -w
'live-server' is not recognized as an internal command
or external, an executable program or a batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yes@1.0.0 server: `live-server --browser=chrome`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yes@1.0.0 server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2021-08-23T16_02_37_907Z-debug.log
ERROR: "server" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yes@1.0.0 start: `npm-run-all --parallel server sass`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yes@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2021-08-23T16_02_38_125Z-debug.log
【问题讨论】:
-
我投票结束这个问题,因为错误是法语。由于StackOverflow is an English-language resource,如果没有翻译,大多数用户无法帮助或受益于其他语言的内容。
标签: css node.js sass command-line compilation