Rollup Js - can't find async_hooks

Viewed 290

I'm tryng 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.

0 Answers
Related