【发布时间】:2021-08-18 20:35:48
【问题描述】:
我正在尝试使用 npm parcel -g 命令全局安装 Parcel,当我使用 parcel index.html 时收到一条错误消息,指出未找到条目。我该怎么做才能解决这个问题?
这是我输入的全局安装包裹的命令。
PS C:\Users\User\Desktop\Moshify> npm i -g parcel-bundler
npm WARN deprecated parcel-bundler@1.12.5: Parcel v1 不再维护。请迁移到在“包裹”包下发布的 v2。有关详细信息,请参阅https://v2.parceljs.org/getting-started/migration。
npm WARN deprecated core-js@2.6.12: core-js@https://github.com/lydell/resolve-url#deprecated
npm WARN 已弃用 urix@0.1.0:请参阅 https://github.com/lydell/urix#deprecated
npm WARN 已弃用 request@2.88.2:请求已弃用,请参阅 https://github.com/request/request/issues/3142
npm WARN 已弃用 request-promise-native@1.0.9: request-promise-native 已被弃用,因为它扩展了现已弃用的请求包,请参阅https://github.com/request/request/issues/3142
npm WARN 已弃用 har-validator@5.1.5:不再支持此库
npm WARN 已弃用 uuid@3.4.0:请升级到版本 7 或更高版本。旧版本可能会在某些情况下使用 Math.random(),这是众所周知的问题。有关详细信息,请参阅https://v8.dev/blog/math-random。
C:\Users\User\AppData\Roaming\npm\parcel -> C:\Users\User\AppData\Roaming\npm\node_modules\parcel-bundler\bin\cli.js
parcel-bundler@1.12.5 安装后 C:\Users\User\AppData\Roaming\npm\node_modules\parcel-bundler node -e "console.log('\u001b[35m\u001b[1mLove Parcel?您现在可以向我们的公开集体捐款:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/包裹/捐赠\u001b[0m')"
爱包裹?您现在可以向我们的公开集体捐款:
https://opencollective.com/parcel/donate npm WARN 可选跳过可选依赖:fsevents@^1.2.7 (node_modules\parcel-bundler\node_modules\chokidar\node_modules\fsevents): npm WARN notsup 跳过可选依赖:fsevents@1.2.13 不受支持的平台:想要 {"os":"darwin","arch":"any"}(当前:{"os":"win32","arch": "x64"})
- parcel-bundler@1.12.5 在 25.129 秒内更新了 1 个包
这是我尝试调用服务器的地方以及我收到的错误消息。
PS C:\Users\User\Desktop\Moshify> 包裹索引.html
服务器运行在 http://localhost:1234
× 未找到条目。
在 Bundler.bundle (C:\Users\User\AppData\Roaming\npm\node_modules\parcel-bundler\src\Bundler.js:275:17)
在异步 Bundler.serve (C:\Users\User\AppData\Roaming\npm\node_modules\parcel-bundler\src\Bundler.js:842:7)
在异步 Command.bundle (C:\Users\User\AppData\Roaming\npm\node_modules\parcel-bundler\src\cli.js:241:20)
【问题讨论】:
标签: javascript html css parcel