【问题标题】:How do I manually change a file name in Parcel?如何手动更改 Parcel 中的文件名?
【发布时间】:2021-10-30 06:24:52
【问题描述】:

每次我尝试运行npm startnpm build 时都会收到错误消息unknown: Entry /mnt/c/Users/kabre/Desktop/18-forkify/index.html does not exist。我被告知 Parcel 可能会自动重命名我的 index.html。由于我刚刚开始学习 Parcel/npm,因此不确定如何继续解决此问题。

【问题讨论】:

标签: javascript npm parceljs


【解决方案1】:

试试这个:

  • 在您的项目中运行 npm init -y
  • 在您的项目中安装 parcel:npm install parcel-bundler --save-dev
  • 把它放在你的package.json中:
  "scripts": {
    "start": "parcel ./index.html",
  }
  • 在此之后运行 npm start

并且会完美运行。

https://parceljs.org/getting_started.html 中查找更多信息

【讨论】:

    猜你喜欢
    • 2015-04-13
    • 1970-01-01
    • 2011-01-24
    • 1970-01-01
    • 2019-08-21
    • 2013-01-27
    • 2020-12-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多