calvinmetcalf / rollup-plugin-node-builtins

138 stars 40 forks source link

Could not load async_hooks #63

Open sdellava opened 4 years ago

sdellava commented 4 years ago

Hallo,

I'm tring to create a single node js file including all library required by a small project.

this is the configuration:

import commonjs from 'rollup-plugin-commonjs'; import resolve from 'rollup-plugin-node-resolve'; import { terser } from "rollup-plugin-terser"; import builtins from 'rollup-plugin-node-builtins'; const plugins = [ builtins(), resolve({preferBuiltins: false}), commonjs(), terser() ]; export default { input: 'index.js', output: { file: bundle.js, format: 'cjs', name: 'mam' }, plugins }

Unfortunately I get this message:

rollup -c index.js → bundle.js... [!] Error: Could not load async_hooks (imported by node_modules\bluebird\js\release\promise.js): ENOENT: no such file or directory, open 'C:\Users............\async_hooks' Error: Could not load async_hooks (imported by node_modules\bluebird\js\release\promise.js): ENOENT: no such file or directory, open 'C:\Users........\async_hooks'

Please note that I've installed the module with this command:

npm i async_hooks

I guess this is an issue in the rollup's builtins plugin.