Skip to content
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

下载代码安装依赖后如何启动 #71

Open
shizhenbin opened this issue May 15, 2022 · 4 comments
Open

下载代码安装依赖后如何启动 #71

shizhenbin opened this issue May 15, 2022 · 4 comments

Comments

@shizhenbin
Copy link

请问下下载代码到本地安装依赖后怎么启动,npm run start吗

@shizhenbin
Copy link
Author

info Deleting .cache, public, F:\resume-master\node_modules.cache\babel-loader,
F:\resume-master\node_modules.cache\terser-webpack-plugin
info Successfully deleted directories

internal/modules/cjs/loader.js:1092
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: F:\resume-master\node_modules\remark-mdx\index.js
require() of ES modules is not supported.
require() of F:\resume-master\node_modules\remark-mdx\index.js from
F:\resume-master\node_modules\gatsby-recipes\dist\graphql-server\server.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from
F:\resume-master\node_modules\remark-mdx\package.json.

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:13)

at Module.load (internal/modules/cjs/loader.js:940:32)
at Function.Module._load (internal/modules/cjs/loader.js:781:14)
at Module.require (internal/modules/cjs/loader.js:964:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (F:\resume-master\node_modules\gatsby-recipes\dist\graphql-server\server.js:52:17)
at Module._compile (internal/modules/cjs/loader.js:1075:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1096:10)
at Module.load (internal/modules/cjs/loader.js:940:32)
at Function.Module._load (internal/modules/cjs/loader.js:781:14) {
code: 'ERR_REQUIRE_ESM'
}

这个报错怎么解决

@electroluxcode
Copy link

npm uninstall remark-mdx 把这玩意卸载了就可以了,亲测可用

@qq1021253810
Copy link

npm uninstall remark-mdx 把这玩意卸载了就可以了,亲测可用

老哥你用的是哪个版本的nodejs

@electroluxcode
Copy link

npm uninstall remark-mdx 把这玩意卸载了就可以了,亲测可用

老哥你用的是哪个版本的nodejs

16.18.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants