我正在使用JavaScript应用程序,它是由yarn
运行的。我在运行yarn run dev
时发现了问题。它显示在错误下面。
yarn run v1.21.1
$ yarn fixlitepicker && rm -rf .cache/ dist/
$ sed -i 's/# sourceMappingURL/ sourceMappingURL/g' node_modules/litepicker/dist/js/main.js
'sed' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
我知道它来自package.json
脚本。
"scripts": {
"dev": "parcel src/index.html",
"build": "yarn install && yarn fixlitepicker && parcel build src/index.html",
"prebuild": "rm -rf dist",
"predev": "yarn fixlitepicker && rm -rf .cache/ dist/",
"fixlitepicker": "sed -i 's/# sourceMappingURL/ sourceMappingURL/g' node_modules/litepicker/dist/js/main.js"
},
我已经从SED下载这里并安装它。安装位置C:\Program Files (x86)\GnuWin32
。但这不管用。我也看到了同样的问题。我不明白如何解决这个问题。
系统
OS:Windows 10 Pro
。
OS版本:1909
。
OS系统类型:64-bit operating system, x64-based processor
。
发布于 2019-12-31 10:39:30
您是否设置了这里提到的主目录,http://gnuwin32.sourceforge.net/install.html
如果没有修复,安装http://cygwin.com/并试一试
发布于 2020-12-19 17:30:13
您从GnuWin32下载并安装了‘sed’,但它不在您的路径上。您需要在将C:\Program Files (x86)\GnuWin32
添加到PATH的终端中运行。您还可以从安装“哪个”中获益,然后可以使用which sed
进行正常检查。
https://stackoverflow.com/questions/59542909
复制相似问题