Error TS5042: Option 'project' cannot be mixed with source files on a command line when running npm run scully
See original GitHub issue🐞 Bug report
The following error happens when I try running npm run scully:
using plugins from folder “./scully” Typescript error while compiling plugins. the error is: error TS5042: Option ‘project’ cannot be mixed with source files on a command line.
⠹ undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 15
npm ERR! <project-name>@0.0.0 scully: scully
npm ERR! Exit status 15
npm ERR!
npm ERR! Failed at the <project-name>@0.0.0 scully script.
Create a new basic anular app, with one route to a test page and ran: ng add @scullyio/init npm run build npm run scully
Windows 10
Angular 10.2.0 Node: 12.18.3
Scully: 1.0.0
package.json: { “name”: “get-hydroponics-online”, “version”: “0.0.0”, “scripts”: { “ng”: “ng”, “start”: “ng serve”, “build”: “ng build”, “test”: “ng test”, “lint”: “ng lint”, “e2e”: “ng e2e”, “scully”: “scully”, “scully:serve”: “scully serve” }, “private”: true, “dependencies”: { “@angular/animations”: “~10.2.0”, “@angular/common”: “~10.2.0”, “@angular/compiler”: “~10.2.0”, “@angular/core”: “~10.2.0”, “@angular/forms”: “~10.2.0”, “@angular/platform-browser”: “~10.2.0”, “@angular/platform-browser-dynamic”: “~10.2.0”, “@angular/router”: “~10.2.0”, “@scullyio/init”: “^1.0.1”, “@scullyio/ng-lib”: “^1.0.0”, “@scullyio/scully”: “^1.0.0”, “rxjs”: “~6.6.0”, “tslib”: “^2.0.0”, “zone.js”: “~0.10.2” }, “devDependencies”: { “@angular-devkit/build-angular”: “~0.1002.0”, “@angular/cli”: “~10.2.0”, “@angular/compiler-cli”: “~10.2.0”, “@types/node”: “^12.11.1”, “@types/jasmine”: “~3.5.0”, “@types/jasminewd2”: “~2.0.3”, “codelyzer”: “^6.0.0”, “jasmine-core”: “~3.6.0”, “jasmine-spec-reporter”: “~5.0.0”, “karma”: “~5.0.0”, “karma-chrome-launcher”: “~3.1.0”, “karma-coverage-istanbul-reporter”: “~3.0.2”, “karma-jasmine”: “~4.0.0”, “karma-jasmine-html-reporter”: “^1.5.0”, “protractor”: “~7.0.0”, “ts-node”: “~8.3.0”, “tslint”: “~6.1.0”, “typescript”: “~4.0.2” } }
Scully/tsconfig.json
{ “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”] }
Log entry:
info using npm@6.14.6
3 info using node@v12.18.3
4 verbose run-script [ ‘prescully’, ‘scully’, ‘postscully’ ]
5 info lifecycle get-hydroponics-online@0.0.0~prescully: get-hydroponics-online@0.0.0
6 info lifecycle get-hydroponics-online@0.0.0~scully: get-hydroponics-online@0.0.0
7 verbose lifecycle get-hydroponics-online@0.0.0~scully: unsafe-perm in lifecycle true
8 verbose lifecycle get-hydroponics-online@0.0.0~scully: PATH: C:\Program
.
.
.
9 verbose lifecycle get-hydroponics-online@0.0.0~scully: CWD: C:\Software Development\get-hydroponics-online
10 silly lifecycle get-hydroponics-online@0.0.0~scully: Args: [ ‘/d /s /c’, ‘scully’ ]
11 silly lifecycle get-hydroponics-online@0.0.0~scully: Returned: code: 15 signal: null
12 info lifecycle get-hydroponics-online@0.0.0~scully: Failed to exec scully script
13 verbose stack Error: get-hydroponics-online@0.0.0 scully: scully
13 verbose stack Exit status 15
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
@thinktank67 I run into your same problem. I was running Scully in a folder having a parent which contains whitespaces (which is pretty normal, on Windows).
I was able to make it work by applying on Scully’s JS files (yes, in the node_modules folder 😦 ) a fix which corresponds to turning this line: https://github.com/scullyio/scully/blob/6d55e6234b93754ea919e67f94aacdb1aeaf0c2c/libs/scully/src/lib/utils/compileConfig.ts#L109 into
exec(`npx tsc -p "${configPath}"`, (err, res) => {
(please note the double quotes)After this fix, everything worked. @SanderElias , do you want me to open a specific issue for this?
For your process question. its a duplicate of #79