webpack-merge-and-include-globally icon indicating copy to clipboard operation
webpack-merge-and-include-globally copied to clipboard

Cannot find module @babel/runtime

Open Justinas-Jurciukonis opened this issue 1 year ago • 1 comments

I have just installed this package via npm install webpack-merge-and-include-globally and running Webpack process throws following error:

Error: Cannot find module '@babel/runtime/helpers/interopRequireDefault'
Require stack:
- /{...}/node_modules/webpack-merge-and-include-globally/index.node6-compatible.js
- /{...}/app/webpack.config.js
- /{...}/gulpfile.js
- /usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/shared/require-or-import.js
- /usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
- /usr/local/lib/node_modules/gulp/node_modules/gulp-cli/index.js
- /usr/local/lib/node_modules/gulp/bin/gulp.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1070:15)
    at Module._load (node:internal/modules/cjs/loader:923:27)
    at Module.require (node:internal/modules/cjs/loader:1137:19)
    at require (node:internal/modules/helpers:121:18)
    at Object.<anonymous> (/{...}/node_modules/webpack-merge-and-include-globally/index.node6-compatible.js:3:30)
    at Module._compile (node:internal/modules/cjs/loader:1255:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
    at Module.load (node:internal/modules/cjs/loader:1113:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1137:19)

seems like @bable/runtime is never requested as dependecy, but it's used in webpack-merge-and-include-globally/index.node6-compatible.js?

Justinas-Jurciukonis avatar Jun 01 '23 06:06 Justinas-Jurciukonis

Same here :

[webpack-cli] Failed to load '{...}ui\v2\webpack.config.js' config
[webpack-cli] Error: Cannot find module '@babel/runtime/helpers/interopRequireDefault'

I cannot understand why @markshapiro does not care ?!

For people like me who trust READMEs, and who will get into trouble because of no mention of babel in the README, you may make it work by running some shell command like the following:

npm i -D @babel/core @babel/preset-env

bzkdjc avatar Mar 25 '24 14:03 bzkdjc