infinitered/gluegun

Not Working on Windows

mfreeman-xtivia opened this issue ยท 4 comments

Followed the basic instructions "npx gluegun new movies", then "cd movies" and "yarn build". Receive errors:

C:\Users\mfreeman\temp\movies>yarn build
yarn run v1.22.10
$ yarn format && yarn lint && yarn clean-build && yarn compile && yarn copy-templates
$ prettier --write **/*.{js,ts,tsx,json}
__tests__\cli-integration.test.ts 342ms
package.json 29ms
src\cli.ts 16ms
src\commands\generate.ts 14ms
src\commands\movies.ts 9ms
src\extensions\cli-extension.ts 10ms
src\types.ts 12ms
tsconfig.json 11ms
tslint.json 9ms
$ tslint -p .
$ rm -rf ./build
'rm' 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.
error Command failed with exit code 1.

Hi, you have to set proper environment. Are you using Git or power shell prompt? you should look into setting Cygin to get it working:

https://www.cygwin.com/

This will likely be fixed in #734.

๐ŸŽ‰ This issue has been resolved in version 5.0.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

Im still having this issue on my system, verified version is the latest 5.0.0 release
(Let me know if im just missing something obvious ๐Ÿ˜„)

image

image

PS C:\Users\Justin> npx gluegun new example
Need to install the following packages:
  gluegun
Ok to proceed? (y) y

โˆš Which language would you like to use? ยท TypeScript - Gives you a build pipeline out of the box (default)
Language used: TypeScript
warning jest > @jest/core > jest-haste-map > sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
warning jest > @jest/core > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
warning jest > @jest/core > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning jest > @jest/core > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
warning jest > @jest/core > jest-haste-map > sane > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[########################################################################################################################################################################################################################################################] 1230/1230 
yarn run v1.22.17
$ eslint "**/*.{js,jsx,ts,tsx}" --fix && prettier "**/*.{js,jsx,ts,tsx,json}" --write
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.5.0

YOUR TYPESCRIPT VERSION: 4.5.5

Please only submit bug reports when using the officially supported version.

=============
__tests__\cli-integration.test.ts 50ms
.eslintrc.js 19ms
package.json 10ms
src\cli.ts 16ms
src\commands\example.ts 13ms
src\commands\generate.ts 11ms
src\extensions\cli-extension.ts 13ms
src\types.ts 3ms
tsconfig.json 6ms
Done in 15.08s.

Generated example CLI with Gluegun 5.0.0.
Using TypeScript
  $ cd example
  $ yarn test
  $ yarn link
  $ example

Since you generated a TypeScript project, we've included a build script.
When you link and run the project, it will use ts-node locally to test.
However, you can test the generated JavaScript locally like this:

  $ yarn build
  $ example --compiled-build

npm notice
npm notice New minor version of npm available! 8.1.2 -> 8.4.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.4.0
npm notice
PS C:\Users\Justin> cd example
PS C:\Users\Justin\example> yarn test
yarn run v1.22.17
ts-jest[config] (WARN) Got `sourceMap: false` from tsconfig file "C:/Users/Justin/example/tsconfig.json". This will disable source map support in ts-jest 27. Please set `sourceMap: true` in your tsconfig file "C:/Users/Justin/example/tsconfig.json" if you want 
to keep source map support on
 PASS  __tests__/cli-integration.test.ts (12.047 s)
  โˆš outputs version (2243 ms)
  โˆš outputs help (1710 ms)
  โˆš generates file (1762 ms)

Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        12.871 s
Ran all test suites.
Done in 20.34s.
PS C:\Users\Justin\example> yarn link
yarn link v1.22.17
success Registered "example".
info You can now run `yarn link "example"` in the projects where you want to use this package and it will be used instead.
PS C:\Users\Justin\example> example
At line:1 char:1
+ example
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (example:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
PS C:\Users\Justin\example> yarn build
$ yarn clean-build && yarn compile && yarn copy-templates
$ rm -rf ./build
'rm' 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.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.