gpt4 book ai didi

javascript - @parcel/核心 : No transformers found for static/actions. glb

转载 作者:行者123 更新时间:2023-12-05 00:32:29 26 4
gpt4 key购买 nike

将 parcel.js 部署到 Vercel 时出现此错误:

@parcel/core: No transformers found for static/actions.glb.
以下是 Vercel 的完整部署日志:
Detected package.json
Installing dependencies...
Detected `package-lock.json` generated by npm 7...
npm WARN deprecated highlight.js@7.3.0: Version no longer supported. Upgrade to @latest
added 27 packages in 3s
154 packages are looking for funding
run `npm fund` for details
Building...
🚨 Build failed.
@parcel/core: No transformers found for static/actions.glb.
/vercel/path0/node_modules/@parcel/config-default/index.json:3:3
2 | "bundler": "@parcel/bundler-default",
> 3 | "transformers": {
> | ^^^^^^^^^^^^^^^^^
> 4 | "types:*.{ts,tsx}": ["@parcel/transformer-typescript-types"],
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 5 | "bundle-text:*": ["...", "@parcel/transformer-inline-string"],
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 6 | "data-url:*": ["...", "@parcel/transformer-inline-string"],
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 7 | "worklet:*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 8 | "@parcel/transformer-worklet",
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 9 | "..."
> | ^^^^^^^^^^^
> 10 | ],
> | ^^^^^^
> 11 | "*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 12 | "@parcel/transformer-babel",
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 13 | "@parcel/transformer-js",
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Command "parcel build index.html" exited with 1
但是当我运行 parcel build index.html在我本地的目录中,它是完全成功的:
enter image description here
任何想法为什么它不在 Vercel 上工作,而是在本地构建?我正在使用 parcel-plugin-static-files-copy我所有的 GLB 文件都在那里和我的 dist 中。
enter image description here
这是我的 package.json :
{
"scripts": {
"deploy": "vercel --prod",
"vercel-build": "parcel build index.html"
},
"dependencies": {
"gsap": "^3.9.1",
"parcel": "^2.0.1",
"static": "^2.0.0",
"three": "^0.136.0",
"vercel": "^23.1.2"
},
"devDependencies": {
"cssnano": "^4.1.11",
"parcel-plugin-static-files-copy": "^2.6.0"
}
}

最佳答案

首先添加一个.parcelrc项目根文件夹中的文件,然后将其添加到:

{
"extends": "@parcel/config-default",
"transformers": {
"*.glb": ["@parcel/transformer-raw"]
}
}
不要忘记重新启动 Parcel 脚本。
使用 Parcel 2.4.0 为我工作

关于javascript - @parcel/核心 : No transformers found for static/actions. glb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70487267/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com