Closed srepollock closed 5 years ago
Running into an error with Inherits not being exported by node_modules/util/util.js.
Rollup Config
import typescript from 'rollup-plugin-typescript2'; import babel from 'rollup-plugin-babel'; import globals from 'rollup-plugin-node-globals'; import builtins from 'rollup-plugin-node-builtins'; import resolve from 'rollup-plugin-node-resolve'; import commonjs from "rollup-plugin-commonjs"; import pkg from "./package.json"; export default { input: './src/index.ts', plugins: [ typescript(), resolve({ preferBuiltins: true, browser: true }), commonjs({ include: "node_modules/*", }), builtins(), globals({ process: true, global: true, dirname: true, filename: true }), babel(), ], output: [ // Required; Array = multiple outputs { file: pkg.main, format: 'umd', name: 'Divine' }, { file: "lib/divine.cjs.js", format: 'cjs' }, { file: pkg.module, format: 'es' } ], watch: { include: [ "src/**/*.ts" ], exclude: [ ] } }
I have used the following fixes to no avail:
commonjs({ include: "node_modules/*", namedExports: { "node_modules/util/util.js": ['inherits'] } }),
Has anyone else seen a similar issue? I can't seem to find more on the web at this time. Thank you for all the help in advance!
This could be related to #394. You can try downgrading resolve to 1.11.0 and see if it helps.
That did solve the issue. thanks @bterlson
Running into an error with Inherits not being exported by node_modules/util/util.js.
Rollup Config
I have used the following fixes to no avail:
Has anyone else seen a similar issue? I can't seem to find more on the web at this time. Thank you for all the help in advance!