Error: only one instance of babel-polyfill is allowed at
See original GitHub issueI 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:
- Created 2 years ago
- Reactions:1
- Comments:8
Top GitHub Comments
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.
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.