ThatOpen/web-ifc-viewer

'cpy' is not recognized as an internal or external command...

Curiosit opened this issue · 4 comments

When trying to run npm command npm run init-repo I am getting an error:
'cpy' is not recognized as an internal or external command,
operable program or batch file.'`

This is the full error:

`> web-ifc-viewer-root@1.0.213 init-repo

yarn && npm run build

yarn install v1.19.0
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.23s.

web-ifc-viewer-root@1.0.213 build
cd viewer && yarn build && cd ../example && yarn build

yarn run v1.19.0
$ tsc
Done in 4.45s.
yarn run v1.19.0
$ rollup -c && npm run copy-wasm && npm run copy-wasm-mt && npm run copy-worker

main.js → build/main.js...
created build/main.js in 5.8s

web-ifc-viewer-basic-example@1.0.213 copy-wasm
cpy ../node_modules/web-ifc/web-ifc.wasm files/

'cpy' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

@Curiosit did you install cpy?

npm i cpy

yes
just to be sure I just ran it again.
npm i cpy

RESULT:

npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
95 packages are looking for funding
  run `npm fund` for details
14 vulnerabilities (1 moderate, 12 high, 1 critical)
To address issues that do not require attention, run:
To address all issues (including breaking changes), run:
  npm audit fix --force
Run `npm audit` for details.

THEN:
npm run init-repo


> web-ifc-viewer-root@1.0.213 init-repo
> yarn && npm run build
yarn install v1.19.0
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to 
mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "win32" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > web-ifc-viewer@1.0.213" has unmet peer dependency "three@^0.135.0".
warning "web-ifc-viewer > camera-controls@1.33.1" has unmet peer dependency "three@>=0.126.1".
warning "web-ifc-viewer > three-mesh-bvh@0.5.11" has unmet peer dependency "three@>= 0.123.0".
warning "web-ifc-viewer > web-ifc-three@0.0.118" has unmet peer dependency "three@0.135".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 5.05s.
> web-ifc-viewer-root@1.0.213 build
> cd viewer && yarn build && cd ../example && yarn build
yarn run v1.19.0
$ tsc
Done in 4.52s.
yarn run v1.19.0
$ rollup -c && npm run copy-wasm && npm run copy-wasm-mt && npm run copy-worker
main.js → build/main.js...
created build/main.js in 5.8s
> web-ifc-viewer-basic-example@1.0.213 copy-wasm
> cpy ../node_modules/web-ifc/web-ifc.wasm files/
'cpy' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Whoops, sorry i meant

npm i cpy-cli

and now it works! thanks!