Scully: Smallest Scully: Unable to Scully

Created on 7 Sep 2020  ·  7Comments  ·  Source: scullyio/scully

🐞 Bug report

Description

My goal is to create the boilerplate Angular application and then smack Scully on-top of it and see that it works. When I try this... it fails. But this may be me entirely.

🔬 Minimal Reproduction

Most of this is pulled from https://scully.io/docs/learn/getting-started/installation/

Here's the setup:

$ cd /tmp
$ ng new test
   ? Would you like to add Angular routing? Yes
   ? Which stylesheet format would you like to use? Sass
$ ng serve # << Works as intended on http://localhost:4200
$ ^C
$ ng add @scullyio/init
$ ng build --prod
$ npm run scully
> [email protected] scully /tmp/test
> scully

using plugins from folder "./scully"
Typescript error while compiling plugins. the error is:
error TS6053: File './scully/**/*.ts' not found.
error TS6053: File '/tmp/test/scully/*.ts' not found.

⠹ undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 15
npm ERR! [email protected] scully: `scully`
npm ERR! Exit status 15
npm ERR! 
npm ERR! Failed at the [email protected] scully script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2020-09-07T18_58_48_586Z-debug.log
$ cat  ~/.npm/_logs/2020-09-07T18_58_48_586Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '~/.nvm/versions/node/v12.12.0/bin/node',
1 verbose cli   '~/.nvm/versions/node/v12.12.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'scully'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prescully', 'scully', 'postscully' ]
5 info lifecycle [email protected]~prescully: [email protected]
6 info lifecycle [email protected]~scully: [email protected]
7 verbose lifecycle [email protected]~scully: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~scully: PATH: ~/.nvm/versions/node/v12.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/tmp/test/node_modules/.bin:~/.nvm/versions/node/v12.12.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle [email protected]~scully: CWD: /tmp/test
10 silly lifecycle [email protected]~scully: Args: [ '-c', 'scully' ]
11 silly lifecycle [email protected]~scully: Returned: code: 15  signal: null
12 info lifecycle [email protected]~scully: Failed to exec scully script
13 verbose stack Error: [email protected] scully: `scully`
13 verbose stack Exit status 15
13 verbose stack     at EventEmitter.<anonymous> (~/.nvm/versions/node/v12.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:210:5)
13 verbose stack     at ChildProcess.<anonymous> (~/.nvm/versions/node/v12.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:210:5)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid [email protected]
15 verbose cwd /tmp/test
16 verbose Linux 5.3.0-7648-generic
17 verbose argv "~/.nvm/versions/node/v12.12.0/bin/node" "~/.nvm/versions/node/v12.12.0/bin/npm" "run" "scully"
18 verbose node v12.12.0
19 verbose npm  v6.11.3
20 error code ELIFECYCLE
21 error errno 15
22 error [email protected] scully: `scully`
22 error Exit status 15
23 error Failed at the [email protected] scully script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 15, true ]

💻Your Environment

Angular Version:



ng --version

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


Angular CLI: 10.1.0
Node: 12.12.0
OS: linux x64

Angular: 10.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1001.0
@angular-devkit/build-angular     0.1001.0
@angular-devkit/build-optimizer   0.1001.0
@angular-devkit/build-webpack     0.1001.0
@angular-devkit/core              10.1.0
@angular-devkit/schematics        10.1.0
@ngtools/webpack                  10.1.0
@schematics/angular               10.1.0
@schematics/update                0.1001.0
rxjs                              6.6.3
typescript                        4.0.2
webpack                           4.44.1

Scully Version:



"@scullyio/scully": "^1.0.0-beta.2"

🔥 Exception or Error



$ npm run scully
> [email protected] scully /tmp/test
> scully

using plugins from folder "./scully"
Typescript error while compiling plugins. the error is:
error TS6053: File './scully/**/*.ts' not found.
error TS6053: File '/tmp/test/scully/*.ts' not found.

⠹ undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 15
npm ERR! [email protected] scully: `scully`
npm ERR! Exit status 15
npm ERR! 
npm ERR! Failed at the [email protected] scully script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2020-09-07T18_58_48_586Z-debug.log

$ cat  ~/.npm/_logs/2020-09-07T18_58_48_586Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '~/.nvm/versions/node/v12.12.0/bin/node',
1 verbose cli   '~/.nvm/versions/node/v12.12.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'scully'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prescully', 'scully', 'postscully' ]
5 info lifecycle [email protected]~prescully: [email protected]
6 info lifecycle [email protected]~scully: [email protected]
7 verbose lifecycle [email protected]~scully: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~scully: PATH: ~/.nvm/versions/node/v12.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/tmp/test/node_modules/.bin:~/.nvm/versions/node/v12.12.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle [email protected]~scully: CWD: /tmp/test
10 silly lifecycle [email protected]~scully: Args: [ '-c', 'scully' ]
11 silly lifecycle [email protected]~scully: Returned: code: 15  signal: null
12 info lifecycle [email protected]~scully: Failed to exec scully script
13 verbose stack Error: [email protected] scully: `scully`
13 verbose stack Exit status 15
13 verbose stack     at EventEmitter. (~/.nvm/versions/node/v12.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:210:5)
13 verbose stack     at ChildProcess. (~/.nvm/versions/node/v12.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:210:5)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid [email protected]
15 verbose cwd /tmp/test
16 verbose Linux 5.3.0-7648-generic
17 verbose argv "~/.nvm/versions/node/v12.12.0/bin/node" "~/.nvm/versions/node/v12.12.0/bin/npm" "run" "scully"
18 verbose node v12.12.0
19 verbose npm  v6.11.3
20 error code ELIFECYCLE
21 error errno 15
22 error [email protected] scully: `scully`
22 error Exit status 15
23 error Failed at the [email protected] scully script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 15, true ]
bug

All 7 comments

I did more reading here: https://scully.io/docs/learn/getting-started/requirements/ and I found the line that says:

Your Angular project needs at least one route set up.

  • Does that mean I cannot just have a home page?
  • Or does that mean I need at least one component in the routes array?

I added one to the routes array:

// src/app/app-routing.module.ts
const routes: Routes = [
    {
      path: '',
      component: HomeComponent,
    }
];

Still generated the same issue even with a fresh build.

Hello,
It means you need a Router module.forRoot() defined with at least a route and router-outlet added in order to navigate to this route

Hello,
It means you need a Router module.forRoot() defined with at least a route and router-outlet added in order to navigate to this route

This minimum required route cannot be '' correct?

It can. '' is a correct path.

It can. '' is a correct path.

Awesome! So should it be working with just the following?

// src/app/app-routing.module.ts
const routes: Routes = [
    {
      path: '',
      component: HomeComponent,
    }
];

Or do I also need to add that to the scully config?

PS: Thanks for the help!

@grok Sorry, there was a bug in our schematics. I just fixed this.
see this comment for a solution in your current project

@SanderElias you're a baller.

Confirmed, that updating the /scully/tsconfig.json file with:

{
  "compileOnSave": false,
  "compilerOptions": {
    "esModuleInterop": true,
    "importHelpers": false,
    "lib": ["ES2019", "dom"],
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "target": "es2018",
    "types": ["node"],
    "skipLibCheck": true,
    "skipDefaultLibCheck": true,
    "typeRoots": ["../node_modules/@types"],
    "allowSyntheticDefaultImports": true
  },
  "exclude": ["./**/*spec.ts"]
}

Allows me to make progress. Thanks again!

Was this page helpful?
0 / 5 - 0 ratings