Closed fengjiling123 closed 10 months ago
Hi, 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.
Can you list the content inside node_modules of https://github.com/ast-grep. Probably we need all directories inside there.
Example screenshot
This example also throws the same error.
This example also throws the same error.
Can you try listing the files under node_modules? Especially @ast-grep
.
I noticed you are using MinGW, can you try it without using MinGW?
If there are no other issues, this will be closed. @fengjiling123
版本信息
问题详情
复现链接
https://github.com/web-infra-dev/modern-js-examples
复现步骤
1.下载modern-js-examples 2.到basic-module下,将buildPreset改成npm-component 3.pnpm build 之后报错