question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: only one instance of babel-polyfill is allowed at

See original GitHub issue

I used Pinata with Serverless.com and there’s no way I can troubleshoot this.

Error: only one instance of babel-polyfill is allowed at Object../node_modules/babel-polyfill/lib/index.js (/Users/my/Development/Projects/blockchain-api-nft/node_modules/@pinata/sdk/lib/pinata-sdk.js:2782:9) at __webpack_require__ (/Users/my/Development/Projects/blockchain-api-nft/node_modules/@pinata/sdk/lib/pinata-sdk.js:30:30) at Object.0 (/Users/my/Development/Projects/blockchain-api-nft/node_modules/@pinata/sdk/lib/pinata-sdk.js:24016:1) at __webpack_require__ (/Users/my/Development/Projects/blockchain-api-nft/node_modules/@pinata/sdk/lib/pinata-sdk.js:30:30) at /Users/my/Development/Projects/blockchain-api-nft/node_modules/@pinata/sdk/lib/pinata-sdk.js:94:18 at /Users/my/Development/Projects/blockchain-api-nft/node_modules/@pinata/sdk/lib/pinata-sdk.js:97:10 at webpackUniversalModuleDefinition (/Users/my/Development/Projects/blockchain-api-nft/node_modules/@pinata/sdk/lib/pinata-sdk.js:3:20) at Object.<anonymous> (/Users/my/Development/Projects/blockchain-api-nft/node_modules/@pinata/sdk/lib/pinata-sdk.js:10:3) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at Object.<anonymous> (/Users/my/Development/Projects/blockchain-api-nft/App/NFT/nft.js:14:20) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at /Users/my/Development/Projects/blockchain-api-nft/node_modules/serverless-offline/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js:157:133 at processTicksAndRejections (internal/process/task_queues.js:95:5) at async InProcessRunner.run (/Users/my/Development/Projects/blockchain-api-nft/node_modules/serverless-offline/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js:157:9)

here’s my dependencies:

"dependencies": {
  "@pinata/sdk": "^1.1.23",
  "@prisma/client": "^3.1.1",
  "axios": "^0.21.1",
  "bip39": "^3.0.4",
  "ethereumjs-wallet": "^1.0.1",
  "firebase-admin": "^9.10.0",
  "hashids": "^2.2.8",
  "jsonwebtoken": "^8.5.1",
  "jwk-to-pem": "^2.0.5",
  "prisma": "^3.1.1",
  "request": "^2.88.2",
  "short-uuid": "^4.2.0",
  "web3": "^1.5.3"
},
"devDependencies": {
  "aws-sdk": "^2.995.0",
  "serverless": "^2.46.0",
  "serverless-dotenv-plugin": "^3.9.0",
  "serverless-dynamodb-local": "^0.2.30",
  "serverless-iam-roles-per-function": "^3.2.0",
  "serverless-offline": "^7.0.0",
  "serverless-prune-plugin": "^1.5.1"
}

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
GonzaloHirschToptalcommented, Feb 11, 2022

I’m running into this now, and it’s making our local development very hard, is there any workaround for this? One that preferable doesn’t involve changing into requires.

1reaction
victaphucommented, Nov 15, 2021

Hi,

Not sure if you still have this problem, but I found that this error is caused by both serverless and Pinata SDK using a babel-polyfill. Once deployed this issue doesn’t exist because of the way that lambda works.

For me, the call works the first time testing locally in serverless-offline, but once deployed it was fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Only one instance of babel-polyfill is allowed" error
Looks like the culprit is HtmlWebpackPlugin in my webpack config. If I remove this plugin, I the error goes away. · try changing...
Read more >
error Error: only one instance of babel-polyfill is allowed #401
I had a similar problem using webpacker. I was loading two javascript apps on the same page using the javascript_pack_tag . Each one...
Read more >
Uncaught Error: only one instance of babel-polyfill is allowed
On a site with a theme that uses webpack and babel (with no issue), once Oasis Workflow is activated an error is thrown...
Read more >
only-one-instance-of-babel-polyfill-allowed-error
CodeSandbox is an online editor tailored for web applications. ... only-one-instance-of-babel-polyfill-allowed-error.
Read more >
Error: only one instance of babel-polyfill is allowed
Error : only one instance of babel-polyfill is allowed ... After adding genomelink node module to my app and I have this error....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found