I am trying to create Stack2.0 transaction and so I tried to install stacks-transaction-js:
npm install stacks-transaction-js
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/stacks-transaction-js - Not found
npm ERR! 404
and based on https://github.com/blockstack/stacks-transactions-js
npm install @blockstack/stacks-transactions
[root@centos-lab testnet]# node
Welcome to Node.js v13.8.0.
Type “.help” for more information.
var variable = require(’@blockstack/stacks-transactions’)
Uncaught:
Error: Cannot find module ‘/root/testnet/node_modules/@blockstack/stacks-transactions/lib/index’. Please verify that the package.json has a valid “main” entry
at tryPackage (internal/modules/cjs/loader.js:315:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:703:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:967:27)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Module.require (internal/modules/cjs/loader.js:1040:19)
at require (internal/modules/cjs/helpers.js:72:18) {
code: ‘MODULE_NOT_FOUND’,
path: ‘/root/testnet/node_modules/@blockstack/stacks-transactions/package.json’,
requestPath: ‘@blockstack/stacks-transactions’
}