Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module '@babel/runtime/regenerator' #12

Open
codati opened this issue Feb 3, 2020 · 3 comments
Open

Error: Cannot find module '@babel/runtime/regenerator' #12

codati opened this issue Feb 3, 2020 · 3 comments

Comments

@codati
Copy link

codati commented Feb 3, 2020

hi (:

npm init
npm i pdfassembler

create file index.js

const PDFAssembler = require('pdfassembler').PDFAssembler;

node index.js
I have error

internal/modules/cjs/loader.js:796
    throw err;
    ^

Error: Cannot find module '@babel/runtime/regenerator'
Require stack:
- xxx/node_modules/pdfjs-dist/lib/core/pdf_manager.js
- xxx/node_modules/pdfassembler/dist/pdfassembler.js
- xxx/node_modules/pdfassembler/dist/index.js
- xxx/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
    at Function.Module._load (internal/modules/cjs/loader.js:686:27)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (xxx/node_modules/pdfjs-dist/lib/core/pdf_manager.js:29:43)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'xxx/node_modules/pdfjs-dist/lib/core/pdf_manager.js',
    'xxx/node_modules/pdfassembler/dist/pdfassembler.js',
    'xxx/node_modules/pdfassembler/dist/index.js',
    'xxx/index.js'
  ]
}

npm -v
6.13.4
node -v
v12.14.1

@patroclos
Copy link

I'm having the same problem

@RyanPWalker
Copy link

Try installing @babel/runtime as a dependency?

@dragonman225
Copy link

I install @babel/runtime manually. By the way, I also have to install core-js and web-streams-polyfill manually before I can start using this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants