[英]parcel-plugin-transcrypt fails with 'Error: Cannot find module 'parcel-bundler/src/Logger'
Transcrypt 插件引用了在較新版本的捆綁器中重構的文件。 要使其工作,您需要添加構建過程所需的三個缺失文件。 這是一個潛在問題的解決方法,但它現在解決了這個問題。 我使用 3 個 wget 命令從 github 中提取文件並將它們放入適當的 node_modules 文件夾中。 因此,在使用 npm 安裝 parcel-bundler 后,我從項目的根文件夾運行這些:
wget -P ./node_modules/parcel-bundler/src/ https://raw.githubusercontent.com/parcel-bundler/parcel/b1e6d59cc44489f20013fa3171e09788978d7aed/packages/core/parcel-bundler/src/Logger.js
wget -P ./node_modules/parcel-bundler/src/utils/ https://raw.githubusercontent.com/parcel-bundler/parcel/b1e6d59cc44489f20013fa3171e09788978d7aed/packages/core/parcel-bundler/src/utils/prettyError.js
wget -P ./node_modules/parcel-bundler/src/utils/ https://raw.githubusercontent.com/parcel-bundler/parcel/b1e6d59cc44489f20013fa3171e09788978d7aed/packages/core/parcel-bundler/src/utils/emoji.js
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.