Closed d1gitalflow closed 2 years ago
tagging @rafaelcr @zone117x because the client sources are in the API repo. do you have an idea why this might happen?
Seems like something Windows-specific, but we don't have any contributors developing or building this repo on Windows AFAIK.
@d1gitalflow can you try updating the @stacks/blockchain-api-client
dependency to a newer version, like https://www.npmjs.com/package/@stacks/blockchain-api-client/v/0.69.0
?
Otherwise I can investigate on a Windows machine later.
Replying to @zone117x
After I git clone https://github.com/blockstack/stacks.js.git
Inside stacks.js folder.
I try to add npm i @stacks/blockchain-api-client
as a 'Dependency' to package.json but without sucess (it doesn't even appear on the list).
Now I do npm install --save-dev @stacks/blockchain-api-client
as a 'devDependency' to package.json and it adds it as:
"devDependencies": {
"@stacks/blockchain-api-client": "^0.34.2",
}
(all this before I do: npm install
inside stack.js folder.
Now I try to upgrade "@stacks/blockchain-api-client": "^0.34.2",
to the latest version and get this on my windows 10 machine:
PS C:\Users\tmjj1\OneDrive\Stacks\sandbox\stacksjsTest1\stacks.js> npm upgrade --save-dev @stacks/blockchain-api-client
npm ERR! code 1
npm ERR! path C:\Users\tmjj1\OneDrive\Stacks\sandbox\stacksjsTest1\stacks.js\packages\cli\node_modules\@stacks\blockchain-api-client
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c "npx shx find lib/index.js || npm run build"
npm ERR! > @stacks/blockchain-api-client@0.34.2 build
npm ERR! > rimraf ./lib && npm run generate-openapi && npm run build:node && npm run build:browser
npm ERR!
npm ERR!
npm ERR! > @stacks/blockchain-api-client@0.34.2 generate-openapi
npm ERR! > npm run prep-openapi && npx @openapitools/openapi-generator-cli generate --skip-validate-spec -g typescript-fetch --additional-properties=withInterfaces=true,typescriptThreePlus=true,supportsES6=true,legacyDiscriminatorBehavior=false,enumPropertyNaming=original,modelPropertyNaming=original -i ./.tmp/openapi.json -o ./src/generated > ./.tmp/gen.log
npm ERR!
npm ERR!
npm ERR! > @stacks/blockchain-api-client@0.34.2 prep-openapi
npm ERR! > rimraf ./.tmp && rimraf ./src/generated && swagger-cli bundle --dereference -o ./.tmp/openapi-temp.json ../docs/openapi.yaml && shx sed -i '^.*\$schema.*$' '' ./.tmp/openapi-temp.json > ./.tmp/openapi.json
npm ERR! '"shx"' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\tmjj1\OneDrive\Stacks\sandbox\stacksjsTest1\stacks.js\packages\cli\node_modules\@stacks\blockchain-api-client
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c ""shx" "find" "lib\index.js""
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\tmjj1\AppData\Local\npm-cache\_logs\2021-10-12T14_39_03_212Z-debug.log
npm ERR! 'swagger-cli' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\tmjj1\OneDrive\Stacks\sandbox\stacksjsTest1\stacks.js\packages\cli\node_modules\@stacks\blockchain-api-client
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c "rimraf ./.tmp && rimraf ./src/generated && swagger-cli bundle --dereference -o ./.tmp/openapi-temp.json ../docs/openapi.yaml && shx sed -i '^.*\$schema.*$' '' ./.tmp/openapi-temp.json > ./.tmp/openapi.json"
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\tmjj1\AppData\Local\npm-cache\_logs\2021-10-12T14_39_05_728Z-debug.log
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\tmjj1\OneDrive\Stacks\sandbox\stacksjsTest1\stacks.js\packages\cli\node_modules\@stacks\blockchain-api-client
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c "npm run prep-openapi && npx @openapitools/openapi-generator-cli generate --skip-validate-spec -g typescript-fetch --additional-properties=withInterfaces=true,typescriptThreePlus=true,supportsES6=true,legacyDiscriminatorBehavior=false,enumPropertyNaming=original,modelPropertyNaming=original -i ./.tmp/openapi.json -o ./src/generated > ./.tmp/gen.log"
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\tmjj1\AppData\Local\npm-cache\_logs\2021-10-12T14_39_05_743Z-debug.log
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\tmjj1\OneDrive\Stacks\sandbox\stacksjsTest1\stacks.js\packages\cli\node_modules\@stacks\blockchain-api-client
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c "rimraf ./lib && npm run generate-openapi && npm run build:node && npm run build:browser"
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\tmjj1\AppData\Local\npm-cache\_logs\2021-10-12T14_39_05_759Z-debug.log
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\tmjj1\AppData\Local\npm-cache\_logs\2021-10-12T14_39_05_922Z-debug.log
PS C:\Users\tmjj1\OneDrive\Stacks\sandbox\stacksjsTest1\stacks.js>
EDIT: Seems to be a windows 10 x64 thing as I sucessfully compiled on ubuntu 20.04
root@stxapi:~# cd stacks/
root@stxapi:~/stacks# git clone https://github.com/blockstack/stacks.js.git
Cloning into 'stacks.js'...
remote: Enumerating objects: 24812, done.
remote: Counting objects: 100% (3193/3193), done.
remote: Compressing objects: 100% (928/928), done.
remote: Total 24812 (delta 2504), reused 2823 (delta 2247), pack-reused 21619
Receiving objects: 100% (24812/24812), 29.87 MiB | 21.17 MiB/s, done.
Resolving deltas: 100% (17507/17507), done.
root@stxapi:~/stacks# cd stacks.js/
root@stxapi:~/stacks/stacks.js# ls
CHANGELOG.md PULL_REQUEST_TEMPLATE.md legacy-changelog.md package-lock.json release-checklist.md tsconfig.typedoc.json
CONTRIBUTING.md README.md lerna.json package.json tsconfig.build.json
LICENSE docs migration-guide.md packages tsconfig.json
root@stxapi:~/stacks/stacks.js# npm install
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
added 1110 packages from 484 contributors and audited 1118 packages in 41.783s
86 packages are looking for funding
run `npm fund` for details
found 74 vulnerabilities (34 moderate, 40 high)
run `npm audit fix` to fix them, or `npm audit` for details
root@stxapi:~/stacks/stacks.js# npm run bootstrap
> stacks.js@1.4.1 bootstrap /root/stacks/stacks.js
> lerna bootstrap
lerna notice cli v3.22.1
lerna info Bootstrapping 12 packages
lerna WARN EHOIST_PKG_VERSION "@stacks/wallet-sdk" package depends on bip32@2.0.6, which differs from the hoisted bip32@^2.0.4.
lerna WARN EHOIST_PKG_VERSION "@stacks/wallet-sdk" package depends on bitcoinjs-lib@^5.1.6, which differs from the hoisted bitcoinjs-lib@^5.2.0.
lerna WARN EHOIST_PKG_VERSION "@stacks/wallet-sdk" package depends on @types/node@^13.13.10, which differs from the hoisted @types/node@^14.14.43.
lerna WARN EHOIST_PKG_VERSION "@stacks/wallet-sdk" package depends on triplesec@^3.0.27, which differs from the hoisted triplesec@^4.0.3.
lerna info Installing external dependencies
lerna info hoist Installing hoisted dependencies into root
lerna info hoist Finished bootstrapping root
lerna info hoist Pruning hoisted dependencies
lerna info hoist Finished pruning hoisted dependencies
lerna info Symlinking packages and binaries
lerna success Bootstrapped 12 packages
root@stxapi:~/stacks/stacks.js# npm run build
> stacks.js@1.4.1 build /root/stacks/stacks.js
> lerna run build
lerna notice cli v3.22.1
lerna info Executing command in 12 packages: "npm run build"
lerna info run Ran npm script 'build' in '@stacks/common' in 15.5s:
> @stacks/common@2.0.1 build /root/stacks/stacks.js/packages/common
> npm run clean && npm run build:cjs && npm run build:esm
> @stacks/common@2.0.1 clean /root/stacks/stacks.js/packages/common
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/common@2.0.1 build:cjs /root/stacks/stacks.js/packages/common
> tsc -b tsconfig.build.json
> @stacks/common@2.0.1 build:esm /root/stacks/stacks.js/packages/common
> tsc -p tsconfig.build.json --module ES6 --outDir ./dist/esm
lerna info run Ran npm script 'build' in '@stacks/encryption' in 16.2s:
> @stacks/encryption@2.0.1 build /root/stacks/stacks.js/packages/encryption
> npm run clean && npm run build:cjs && npm run build:esm
> @stacks/encryption@2.0.1 clean /root/stacks/stacks.js/packages/encryption
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/encryption@2.0.1 build:cjs /root/stacks/stacks.js/packages/encryption
> tsc -b tsconfig.build.json
> @stacks/encryption@2.0.1 build:esm /root/stacks/stacks.js/packages/encryption
> tsc -p tsconfig.build.json --module ES6 --outDir ./dist/esm
lerna info run Ran npm script 'build' in '@stacks/network' in 14.9s:
> @stacks/network@2.0.1 build /root/stacks/stacks.js/packages/network
> npm run clean && npm run build:cjs && npm run build:esm
> @stacks/network@2.0.1 clean /root/stacks/stacks.js/packages/network
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/network@2.0.1 build:cjs /root/stacks/stacks.js/packages/network
> tsc -b tsconfig.build.json
> @stacks/network@2.0.1 build:esm /root/stacks/stacks.js/packages/network
> tsc -p tsconfig.build.json --module ES6 --outDir ./dist/esm
lerna info run Ran npm script 'build' in '@stacks/transactions' in 21.9s:
> @stacks/transactions@2.0.1 build /root/stacks/stacks.js/packages/transactions
> npm run clean && npm run build:cjs && npm run build:esm
> @stacks/transactions@2.0.1 clean /root/stacks/stacks.js/packages/transactions
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/transactions@2.0.1 build:cjs /root/stacks/stacks.js/packages/transactions
> tsc -b tsconfig.build.json
> @stacks/transactions@2.0.1 build:esm /root/stacks/stacks.js/packages/transactions
> tsc -p tsconfig.build.json --module ES6 --outDir ./dist/esm
lerna info run Ran npm script 'build' in '@stacks/bns' in 19.3s:
> @stacks/bns@2.0.1 build /root/stacks/stacks.js/packages/bns
> npm run clean && npm run build:cjs && npm run build:esm
> @stacks/bns@2.0.1 clean /root/stacks/stacks.js/packages/bns
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/bns@2.0.1 build:cjs /root/stacks/stacks.js/packages/bns
> tsc -b tsconfig.build.json
> @stacks/bns@2.0.1 build:esm /root/stacks/stacks.js/packages/bns
> tsc -p tsconfig.build.json --module ES6 --outDir ./dist/esm
lerna info run Ran npm script 'build' in '@stacks/profile' in 19.5s:
> @stacks/profile@2.0.1 build /root/stacks/stacks.js/packages/profile
> npm run clean && npm run build:cjs && npm run build:esm
> @stacks/profile@2.0.1 clean /root/stacks/stacks.js/packages/profile
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/profile@2.0.1 build:cjs /root/stacks/stacks.js/packages/profile
> tsc -b tsconfig.build.json
> @stacks/profile@2.0.1 build:esm /root/stacks/stacks.js/packages/profile
> tsc -p tsconfig.build.json --module ES6 --outDir ./dist/esm
lerna info run Ran npm script 'build' in '@stacks/stacking' in 20.9s:
> @stacks/stacking@2.0.1 build /root/stacks/stacks.js/packages/stacking
> npm run clean && npm run build:cjs && npm run build:esm
> @stacks/stacking@2.0.1 clean /root/stacks/stacks.js/packages/stacking
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/stacking@2.0.1 build:cjs /root/stacks/stacks.js/packages/stacking
> tsc -b tsconfig.build.json
> @stacks/stacking@2.0.1 build:esm /root/stacks/stacks.js/packages/stacking
> tsc -p tsconfig.build.json --module ES6 --outDir ./dist/esm
lerna info run Ran npm script 'build' in '@stacks/auth' in 21.1s:
> @stacks/auth@2.0.1 build /root/stacks/stacks.js/packages/auth
> npm run clean && npm run build:cjs && npm run build:esm
> @stacks/auth@2.0.1 clean /root/stacks/stacks.js/packages/auth
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/auth@2.0.1 build:cjs /root/stacks/stacks.js/packages/auth
> tsc -b tsconfig.build.json
> @stacks/auth@2.0.1 build:esm /root/stacks/stacks.js/packages/auth
> tsc -p tsconfig.build.json --module ES6 --outDir ./dist/esm
lerna info run Ran npm script 'build' in '@stacks/storage' in 21.8s:
> @stacks/storage@2.0.1 build /root/stacks/stacks.js/packages/storage
> npm run clean && npm run build:cjs && npm run build:esm
> @stacks/storage@2.0.1 clean /root/stacks/stacks.js/packages/storage
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/storage@2.0.1 build:cjs /root/stacks/stacks.js/packages/storage
> tsc -b tsconfig.build.json
> @stacks/storage@2.0.1 build:esm /root/stacks/stacks.js/packages/storage
> tsc -p tsconfig.build.json --module ES6 --outDir ./dist/esm
lerna info run Ran npm script 'build' in '@stacks/keychain' in 29.7s:
> @stacks/keychain@2.0.1 build /root/stacks/stacks.js/packages/keychain
> npm run clean && npm run build:cjs && npm run build:esm
> @stacks/keychain@2.0.1 clean /root/stacks/stacks.js/packages/keychain
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/keychain@2.0.1 build:cjs /root/stacks/stacks.js/packages/keychain
> tsc -b tsconfig.build.json
> @stacks/keychain@2.0.1 build:esm /root/stacks/stacks.js/packages/keychain
> tsc -p tsconfig.build.json --module ES6 --outDir ./dist/esm
lerna info run Ran npm script 'build' in '@stacks/wallet-sdk' in 26.0s:
> @stacks/wallet-sdk@2.0.1 build /root/stacks/stacks.js/packages/wallet-sdk
> npm run clean && npm run build:cjs && npm run build:esm
> @stacks/wallet-sdk@2.0.1 clean /root/stacks/stacks.js/packages/wallet-sdk
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/wallet-sdk@2.0.1 build:cjs /root/stacks/stacks.js/packages/wallet-sdk
> tsc -b tsconfig.build.json
> @stacks/wallet-sdk@2.0.1 build:esm /root/stacks/stacks.js/packages/wallet-sdk
> tsc -p tsconfig.build.json --module ES6 --outDir ./dist/esm
lerna info run Ran npm script 'build' in '@stacks/cli' in 22.6s:
> @stacks/cli@2.0.1 build /root/stacks/stacks.js/packages/cli
> npm run clean && npm run build:cjs
> @stacks/cli@2.0.1 clean /root/stacks/stacks.js/packages/cli
> rimraf dist && tsc -b tsconfig.build.json --clean
> @stacks/cli@2.0.1 build:cjs /root/stacks/stacks.js/packages/cli
> tsc -b tsconfig.build.json
lerna success run Ran npm script 'build' in 12 packages in 249.5s:
lerna success - @stacks/auth
lerna success - @stacks/bns
lerna success - @stacks/cli
lerna success - @stacks/common
lerna success - @stacks/encryption
lerna success - @stacks/keychain
lerna success - @stacks/network
lerna success - @stacks/profile
lerna success - @stacks/stacking
lerna success - @stacks/storage
lerna success - @stacks/transactions
lerna success - @stacks/wallet-sdk
root@stxapi:~/stacks/stacks.js# ^C
root@stxapi:~/stacks/stacks.js#
Describe the bug
Every module was built sucessfully except
@stacks/blockchain-api-client
which seems to be missing, and might be the reason for this error:This error I think its related to: https://github.com/blockstack/stacks.js/issues/1111
What version of stacks.js are you using? version 2.0.1 on windows 10 x64
Node.js Version PS C:\Users\tmjj1\OneDrive\Documentos\SandboxNodejs\src> node -v
v15.0.1
NPM version npm@7.0.3