-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无法正确生成helpers.mjs文件以及出现Error: EBUSY: resource busy or locked错误 #97
Comments
是的,当时设计实现时候,写的比较粗糙,没有考虑到这种场景。后续看到没有什么用户就没有继续迭代版本。 没想到还是大佬在用的哈,感谢使用,这个问题我会尽快 fix 的。 |
可以试试 "weapp-pandacss": "1.5.1", 版本,这个版本减少了一些不必要的 fs 操作 假如还是不能解决问题,再在这个 issue 里回复吧 |
感谢如此快的响应,问题仍然存在,错误和helpers.mjs的问题也一样,按之前那样修改后就正常了 |
我学习你一下你的改法,因为你是在我的 dist 产物上改的,出现问题的源代码应该在这里: |
看起来您的改动能解决问题,但是不能治本。我很想找一种,可以治本的方法。 请问您能提供可复现的 demo,或者您能够把我加到私有仓库里面吗,我想复现一下这个错误。 |
试试 1.5.3 版本,我又尝试修复了一下 |
【环境】
![image](https://private-user-images.githubusercontent.com/29849518/346400652-6a12433d-302c-4ac0-9cba-501297ed4da4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMTg0NjAsIm5iZiI6MTcyNDExODE2MCwicGF0aCI6Ii8yOTg0OTUxOC8zNDY0MDA2NTItNmExMjQzM2QtMzAyYy00YWMwLTljYmEtNTAxMjk3ZWQ0ZGE0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAxNDI0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4MmQxY2Y5MmJhNzRjNjBjZDVhYTA1ZjFjMGQ3NTVjNGY4OGU2MWEzOGIwZWUwNzJkMjc5ZWY4NjUyOGIwYmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KWjk5OQIKDJO25-jKAZLA6IZNPXKQYlrscKrGJ6BuyI)
![image](https://private-user-images.githubusercontent.com/29849518/346400916-3f8796f5-5caa-4d09-a758-548feb18fb7e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMTg0NjAsIm5iZiI6MTcyNDExODE2MCwicGF0aCI6Ii8yOTg0OTUxOC8zNDY0MDA5MTYtM2Y4Nzk2ZjUtNWNhYS00ZDA5LWE3NTgtNTQ4ZmViMThmYjdlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAxNDI0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAzNTE1NWJmNzBiYmNmODI3NGY2ZjA0YTdjNzVlZWFlODc2MzhhZjY5NDAwNjZlZjlhNjliYjA2OWE1MGYyNjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vywJ7Rp4QBWwG4Y8RPkRPYNebvpHeT_vfj7nA1Oj8Fw)
![image](https://private-user-images.githubusercontent.com/29849518/346401614-a2353a18-f6eb-4158-8cae-8d61c24031ac.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMTg0NjAsIm5iZiI6MTcyNDExODE2MCwicGF0aCI6Ii8yOTg0OTUxOC8zNDY0MDE2MTQtYTIzNTNhMTgtZjZlYi00MTU4LThjYWUtOGQ2MWMyNDAzMWFjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAxNDI0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkNTY5ZDdmZGVhMGI0ZTBiZjk3YTBiOTQyY2IzYzJjZWFhNGUyODc0ZGM3NTU4YmU2ZDkwNWM5MGVjZTMyYzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.9XbtRyd9llr6SqucoZ1CP_bhTmNQTAu8wnE7z3atgtY)
![image](https://private-user-images.githubusercontent.com/29849518/346409183-b45a4ee5-d7e0-4d38-9822-ba51d8203140.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMTg0NjAsIm5iZiI6MTcyNDExODE2MCwicGF0aCI6Ii8yOTg0OTUxOC8zNDY0MDkxODMtYjQ1YTRlZTUtZDdlMC00ZDM4LTk4MjItYmE1MWQ4MjAzMTQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAxNDI0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFjYzg1NDliOWEzNWMyMTIxMmIxYjJiYjM5OTlkMGQzODc4ZWU3NmUwOTc4NzBjNDE5ZjBkYTcxZmMxZDkyYjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bPK-w4n7oUjBcyH2oucshPY4b90TpusKB3iVdWDJQh4)
![image](https://private-user-images.githubusercontent.com/29849518/346409780-d6e28bcd-0a62-457e-9d05-4515aa81db9b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMTg0NjAsIm5iZiI6MTcyNDExODE2MCwicGF0aCI6Ii8yOTg0OTUxOC8zNDY0MDk3ODAtZDZlMjhiY2QtMGE2Mi00NTdlLTlkMDUtNDUxNWFhODFkYjliLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAxNDI0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNkODNmNjMwNTBhNDFlYzIzYTE1NjU0OTk5NDE1NWQ5NDcwM2NlZDc2NTVhNDg2NDM2ZmRmZDEwM2IyMDUzZTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.DENCS88MSv4PkT7jGR-8KSIvtfxlOpiW9CSRmE2siUQ)
window 10专业版,vs code 1.91.0,taro 3.6.29,postcss 8.4.39,@pandacss/dev 0.39.2,weapp-pandacss 1.5.0
【问题】
panda codegen && weapp-panda codegen命令执行正常,已正确生成helpers.mjs文件
在执行build:weapp和dev:weapp命令时均会出现如下Error: EBUSY: resource busy or locked错误
每次执行编译EBUSY: resource busy or locked出现的次数和指向的文件有一定随机性
同时会导致helpers.mjs文件只有一行代码
【尝试解决】
1、在编译结束后,应用无法正常运行,但用weapp-panda codegen生成的正常的helpers.mjs文件内容替换掉错误的内容后,应用和样式就正常了
2、尝试修改node_modules/weapp-pandacss/dist/context-DWYG9rON.cjs文件
修改后可消除EBUSY错误
3、尝试修改node_modules/weapp-pandacss/dist/context-DWYG9rON.cjs文件
修改后可生成正确的helpers.mjs文件
【疑问】
taro-react-pandacss-template 示例中,代码文件较少,就不会出现这个问题。但我的工程的文件数比较多,编译时createContext里的codegen方法会执行几十次,其中调用的copyEscape、patch方法会不断地读写文件,猜测是并行过程导致了文件读写异常,请问是否有其他方式能修复这个问题?
The text was updated successfully, but these errors were encountered: