-
Notifications
You must be signed in to change notification settings - Fork 370
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
[Bug]: modern build failed on windows10 but work successfully on windows11 and macOS #4883
Comments
@10Derozan Please check this |
重装依赖可以解决吗 |
解决不了诶 |
我理解这是本地环境的问题吧,可以提供一些解答么?感谢@HerringtonDarkholme |
@10Derozan 把buildType: 'bundleless'改成buildType: 'bundle'就好了,麻烦看一下为什么bundleless会报这个错 |
@10Derozan 把demo的配置改成npm-component也会报这个错 |
@AuglyXu can you try these commands in a new project? https://ast-grep.github.io/guide/api-usage.html pnpm add @ast-grep/napi import { js } from '@ast-grep/napi';
const source = `console.log("hello world")`
const ast = js.parse(source)
const node = ast.root().find('console.log') If the code example works, I would speculate the problem is pnpm. |
@AuglyXu I think there is some issues in your deps. pnpm is finding ast-grep/napi 0.12.0 while modern only installs 0.1.13 |
Thank you @HerringtonDarkholme .Actually it not append on my computer, it's my partner's computer happened.My partner firmly believe that I pasted the wrong picture and she proposed the new issue https://github.com/web-infra-dev/modern.js/issues/4900, so she unwilling to try and i'm also distressed.She say may be you can position from the new picture.Does she need to run the above code or you can position the question combined the two pictures? |
bundleless 的场景我才会用 ast-grep 做一些例如别名替换的操作 |
I recommend you can follow the steps below:
It doesn't look like it's an ast grep problem. If you can not reappear, i'll close this issue two days later
|
Ok ,fine, i found another issue the same with this, switch there. |
Version
Details
我的配置如下:
import { moduleTools, defineConfig } from '@modern-js/module-tools';
export default defineConfig({
buildConfig: [
{
format: 'cjs',
target: 'es6',
buildType: 'bundleless',
outDir: './build/lib',
sideEffects: [/.css$/],
dts: false,
/** 只需拷贝一次即可 */
copy: {
patterns: [
{
from: 'package.json',
context: __dirname,
to: './../package.json',
},
],
},
},
{
format: 'esm',
target: 'es6',
buildType: 'bundleless',
outDir: './build/es',
sideEffects: [/.css$/],
dts: false,
},
],
plugins: [moduleTools()],
});
Reproduce link
base config enough
Reproduce Steps
The text was updated successfully, but these errors were encountered: