首页 > 解决方案 > Parcel build 命令在尝试编译时抛出错误

问题描述

当我运行“npm run dev”时,它就像一个魅力,但是当我启动“npm run dev”时,就会发生这种情况。我有包裹,sass 和 yeoman。

npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! parcel-sass-boilerplate@1.0.0 build: `parcel build src/index.html`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the parcel-sass-boilerplate@1.0.0 build 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\nikok\AppData\Roaming\npm-cache\_logs\2021-09-28T07_20_11_855Z-debug.log

标签: sasserror-handlingcompiler-errorsparceljs

解决方案


像这样将--no-minify添加到脚本中:

"build": "parcel build src/index.html --no-minify"

推荐阅读