scullyio / scully

The Static Site Generator for Angular apps
https://scully.io/
MIT License
2.56k stars 257 forks source link

Issue with Scully CLI on Windows #1550

Open dgrbrady opened 2 years ago

dgrbrady commented 2 years ago

🐞 Bug report

Description

Trying to run npx sully or npx scully -- in windows CMD results in the following error:

'"-S"' is not recognized as an internal or external command,
operable program or batch file.

Trying the same commands in WSL gives:

/path/to/project/node_modules/.bin/scully: 11: exec: -S: not found

🔬 Minimal Reproduction

  1. Run ng new to create new angular project
  2. Try adding scully via ng add @scullyio/init
  3. The command will fail with the output npm ERR! Could not resolve dependency: npm ERR! peer @angular/animations@"12.2.16" from @angular/platform-server@12.2.16.
  4. See this issue for workaround
  5. After workaround is finished, run ng build
  6. After build is finished, run npx scully or npx scully -- to receive error

💻Your Environment

Angular Version:





     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 13.2.5
Node: 16.13.2
Package Manager: npm 8.5.2
OS: win32 x64

Angular: 13.2.4
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1302.5
@angular-devkit/build-angular   13.2.5
@angular-devkit/core            13.2.5
@angular-devkit/schematics      13.2.5
@angular/cli                    13.2.5
@schematics/angular             13.2.5
rxjs                            7.5.4
typescript                      4.5.5

Scully Version:




{
  "name": "my-blog",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test",
    "scully": "npx scully --",
    "scully:serve": "npx scully serve --"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~13.2.0",
    "@angular/common": "~13.2.0",
    "@angular/compiler": "~13.2.0",
    "@angular/core": "~13.2.0",
    "@angular/forms": "~13.2.0",
    "@angular/platform-browser": "~13.2.0",
    "@angular/platform-browser-dynamic": "~13.2.0",
    "@angular/platform-server": "^13",
    "@angular/router": "~13.2.0",
    "@scullyio/init": "^3.0.0-beta.0",
    "@scullyio/ng-lib": "^3.0.0-beta.0",
    "@scullyio/platform-server": "^3.0.0-beta.0",
    "@scullyio/scully": "^3.0.0-beta.0",
    "rxjs": "~7.5.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~13.2.5",
    "@angular/cli": "~13.2.5",
    "@angular/compiler-cli": "~13.2.0",
    "@types/jasmine": "~3.10.0",
    "@types/node": "^12.11.1",
    "jasmine-core": "~4.0.0",
    "karma": "~6.3.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.1.0",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "~1.7.0",
    "typescript": "~4.5.2"
  }
}

🔥 Exception or Error




'"-S"' is not recognized as an internal or external command,
operable program or batch file.
SanderElias commented 2 years ago

@Jefiozie Your on windows, can you check this?

Jefiozie commented 2 years ago

@dgrbrady I just checked this on a win 10 machine and I can't reproduce this issue.

image

Would you be able to make a minimal reproduction repository public?

SanderElias commented 2 years ago

@dgrbrady Both @Jefiozie and I checked on windows, and couldn't reproduce your issue. We can't help you unless we can reproduce the issue. Can you please provide a way for that?

dgrbrady commented 2 years ago

@SanderElias @Jefiozie Absolutely! Thanks for the attention to this. I'll set up a reproduction repository shortly.

dgrbrady commented 2 years ago

@SanderElias @Jefiozie Okay, so I made 2 separate repos, one that specifies the Puppeteer renderer and one that specifies SPS. It looks like this issue is only related to SPS as I was able to run npx scully in the project I used with Puppeteer. You should be able to see the SPS repo here

SanderElias commented 2 years ago

@dgrbrady I finally was able to reproduce, I'm going to work on a solution this week

govi2010 commented 2 years ago

@SanderElias I am still facing issue with beta version and angular 13