According to guesses, it should be a project created under a low version of nodejs. In a high version of nodejs, compilation problems caused by version differences
Solution
Modify the configuration of exports in node_modules\@babel\helper-compilation-targets\package.json as follows:
{ ..., "exports": { ".":"./lib/index.js" } }
Similar Posts:
- [Solved] Error: No module factory available for dependency type: ContextElementDependency
- [Solved] Property or signature expected when compiling TS
- Local workspace file (‘angular.json’) could not be found.
- [Solved] react Project Error: Support for the experimental syntax ‘decorators-legacy’ isn’t currently enabled
- vue ‘Couldn’t find preset “es2015” relative to directory’
- For Vue, an error is reported in “exports is not defined” in webpack
- electron-vue:Webpack ReferenceError: process is not defined
- [Two Solutions] Syntax error: unexpected token import
- [Solved] Vue Project Created error: found 23 vulnerabilities (2 low, 16 moderate, 5 high)
- [Solved] app crashed – waiting for file changes before starting…