-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Description
Describe the bug
A clear and concise description of what the bug is.
npm run deploy
fails with error
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/nathanmassa/dev/test-toolkit/deploy-dns/src/deploy.ts
at new NodeError (node:internal/errors:399:5)
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:99:9)
at defaultGetFormat (node:internal/modules/esm/get_format:139:38)
at defaultLoad (node:internal/modules/esm/load:83:20)
at nextLoad (node:internal/modules/esm/hooks:735:28)
at load (/Users/nathanmassa/dev/test-toolkit/deploy-dns/node_modules/ts-node/dist/child/child-loader.js:19:122)
at nextLoad (node:internal/modules/esm/hooks:735:28)
at Hooks.load (node:internal/modules/esm/hooks:380:26)
at MessagePort.handleMessage (node:internal/modules/esm/worker:165:24)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:762:20) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
To Reproduce
Create a new project with the initializer, run npm run deploy
Expected behavior
A clear and concise description of what you expected to happen.
it should execute the script src/deploy.ts
Screenshots
If applicable, add screenshots to help explain your problem.
Versions
The versions of software and packages the bug in present in (massa-as-sdk, toolkit, Thyra, web browser...)
node: v20.2.0
npm: 9.6.6
OS: mac M1 (arm)
Additional context
Add any other context about the problem here.
I have found a workaround:
node --loader ts-node/esm src/deploy.ts
but I have another error:
Wallet Address: AU1wN8rn4SkwYSTDF3dHFY4U28KtsqKL1NnEjDZhHnHEy6cEQm53 has balance (candidate, final) = (499.98975, 499.98975)
Sending operation with 100000000 MAS coins...
/Users/nathanmassa/dev/test-toolkit/deploy-dns/node_modules/@massalabs/massa-web3/dist/cmd/web3/BaseClient.js:170
error: new Error(responseData.error.message),
^
Error: Parsing error: signature bs58_check parsing error: [0, 59, 189, 139, 90, 228, 72, 215, 199, 119, 169, 132, 95, 193, 222, 125, 224, 148, 45, 45, 135, 52, 203, 219, 19, 234, 27, 226, 230, 8, 171, 204, 71, 212, 73, 212, 182, 160, 91, 119, 1, 49, 79, 235, 218, 13, 155, 209, 182, 62, 125, 214, 199, 50, 234, 161, 28, 192, 34, 192, 42, 73, 76, 50, 12] at line 1 column 100243
at SmartContractsClient.promisifyJsonRpcCall (/Users/nathanmassa/dev/test-toolkit/deploy-dns/node_modules/@massalabs/massa-web3/dist/cmd/web3/BaseClient.js:170:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SmartContractsClient.sendJsonRPCRequest (/Users/nathanmassa/dev/test-toolkit/deploy-dns/node_modules/@massalabs/massa-web3/dist/cmd/web3/BaseClient.js:191:16)
at async SmartContractsClient.deploySmartContract (/Users/nathanmassa/dev/test-toolkit/deploy-dns/node_modules/@massalabs/massa-web3/dist/cmd/web3/SmartContractsClient.js:90:23)
at async deploySC (file:///Users/nathanmassa/dev/test-toolkit/deploy-dns/node_modules/@massalabs/massa-sc-deployer/dist/index.js:202:18)
at async file:///Users/nathanmassa/dev/test-toolkit/deploy-dns/src/deploy.ts:20:5
tell me if it requires another issue for this error or if it's related
Metadata
Metadata
Assignees
Labels
No labels