question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scully doesn't generate anything

See original GitHub issue

🐞 Bug report

Trying to install the blog I am not getting any changes to the project. The package does nothing at all. But the dependency @scullyio/init is installed. Dependency @scullyio/ng-lib NOT installed.

Description

🔬 Minimal Reproduction

  1. Run this command in terminal ng add @scullyio/init
  2. After choosing:
? Which route renderer would you like to use? 
> Scully platform server

nothing happens (I don’t get any answer at all):

image

Scully doesn’t create config file and doesn’t import ScullyLibModule in the main application module.

💻Your Environment

Angular Version:




Angular CLI: 14.0.7
Node: 16.16.0
Package Manager: npm 8.14.0 
OS: win32 x64

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

Package                         Version
---------------------------------------------------------  
@angular-devkit/architect       0.1401.0
@angular-devkit/build-angular   14.1.0
@angular-devkit/core            14.1.0
@angular-devkit/schematics      14.0.7
@angular/cli                    14.0.7
@schematics/angular             14.0.7
rxjs                            7.5.6
typescript                      4.7.4

Scully Version:




"@scullyio/init": "^2.1.36"

🔥 Exception or Error




Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Lindurioncommented, Aug 9, 2022

Hitting the same issue (even from a brand new Angular 14 app workspace). Debugging a little bit, exception being thown is: TypeError: Cannot read properties of null (reading 'toString')

at https://github.com/scullyio/scully/blob/v2.1.39/libs/scully-schematics/src/utils/utils.ts#L151 (line 149 also throws the same error trying to invoke null.toString())

Seems like the issue is project being 'defaultProject', for which the host.read() calls return null.

Initializing with an explicit --project command-line argument seems to get past this problem:

npx ng add @scullyio/init --project=my-project-name

but if you choose what seems like the default renderer option (Scully platform server), the init schematic fails on a later step with:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-project-name@0.2.0
npm ERR! Found: @angular/animations@14.1.1
npm ERR! node_modules/@angular/animations
npm ERR!   @angular/animations@"^14.1.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/animations@"12.2.16" from @angular/platform-server@12.2.16
npm ERR! node_modules/@angular/platform-server
npm ERR!   @angular/platform-server@"^12" from the root project

(I did not try going in and updating Scully’s @angular/platform-server version to 14).

But trying to init again and choosing Pupeteer completed the init schematic successfully.

Side note, I then had to remove the extra -- from the package.json Scully commands:

npx scully --project my-project-name

This default generated script did NOT work work (running from Windows Terminal PowerShell 7, though I would hope that doesn’t affect behavior):

npx scully -- --project my-project-name
0reactions
morenoisidrocommented, Oct 1, 2022

Same problem here.

Angular CLI: 14.2.4
Node: 16.14.2
Package Manager: npm 8.5.0
OS: win32 x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1402.4
@angular-devkit/build-angular   14.2.4
@angular-devkit/core            14.2.4
@angular-devkit/schematics      14.2.4
@schematics/angular             14.2.4
rxjs                            7.5.7
typescript                      4.7.4

As @Lindurion and @SanderElias suggested, this worked for me:

npx --force ng add --force @scullyio/init --project=[PROJECT_NAME]

Where PROJECT_NAME is the one specified under angular.json

Output:

> npx --force ng add --force @scullyio/init --project=ng-kitsune-site
npm WARN using --force Recommended protections disabled.
Skipping installation: Package already installed
? Which route renderer would you like to use? Scully platform server
    polyfills.ts is already upto date
    Installing ng-lib
    Installing Scully Platform Server plugin
UPDATE .gitignore (680 bytes)
UPDATE package.json (1228 bytes)
✔ Packages installed successfully.
CREATE scully.ng-kitsune-site.config.ts (325 bytes)
UPDATE package.json (1354 bytes)
CREATE scully/tsconfig.json (450 bytes)
CREATE scully/plugins/plugin.ts (305 bytes)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · scullyio/scully - GitHub
Scully fail to make pages - plugin "storeRoutes has thrown the below error, bug Something isn't working. #1630 opened 2 weeks ago by...
Read more >
Scully doesn't generate static files for blog-list component
I'm trying to develop a blog with Scully. There are 3 routes. Homepage, Blog page and dynamic Blog Post page. Scully generate static...
Read more >
Scully Build Does Not Finish - Netlify Support Forums
I have it all working on my local machine, but when I try to do a branch deploy to test, the build doesn't...
Read more >
Frequently Asked Questions - Scully.io
How do I fix plugin build errors related to the `express-serve-static-core` module? ... Scully doesn't seem to find the plugins I just declared....
Read more >
Why is Scully so skeptical? : r/XFiles - Reddit
He doesn't care if something makes sense or not. ... it actually makes Mulder a better investigator because he uses it as incentive...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found