-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "Unknown Protocol on url "[object Object]"." #3
Comments
Hi, for me it runs perfectly: $ ng g ngx-spec:spec _catalog-explorer/content/zooming/zooming.component
CREATE src/app/_catalog-explorer/content/zooming/zooming.component.spec.ts (635 bytes) It actually does not matter whether the component exists or not :D |
which @angular/cli version are you using? |
"devDependencies": {
"@angular-devkit/build-angular": "^0.6.8",
"@angular/cli": "^6.0.8",
"@angular/compiler-cli": "^6.0.4",
"@angular/language-service": "^6.0.4",
"@types/jasmine": "^2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"bread-compressor-cli": "^1.0.0",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.4.3",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"ngx-spec": "^0.1.2",
"protractor": "^5.3.2",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "~2.7.2"
} |
@assafshemesh could you please post your package.json dependencies? |
"dependencies": {
"@angular-devkit/core": "0.6.8",
"@angular-devkit/schematics": "0.6.8",
"@angular/animations": "5.1.0",
"@angular/cdk": "5.2.1",
"@angular/common": "5.1.0",
"@angular/compiler": "5.1.0",
"@angular/core": "5.1.0",
"@angular/forms": "5.1.0",
"@angular/http": "5.1.0",
"@angular/material": "5.2.1",
"@angular/platform-browser": "5.1.0",
"@angular/platform-browser-dynamic": "5.1.0",
"@angular/platform-server": "5.1.0",
"@angular/router": "5.1.0",
"angular-tree-component": "7.2.0",
"angular2-highcharts": "^0.5.5",
"bootstrap": "^3.3.7",
"chart.js": "^2.7.0",
"core-js": "^2.4.1",
"ie-shim": "^0.1.0",
"locks": "^0.2.2",
"ng2-charts": "^1.6.0",
"ngx-clipboard": "11.1.1",
"ngx-perfect-scrollbar": "5.3.1",
"patternomaly": "^1.3.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.5.6",
"uuid": "3.2.1",
"xlsx": "^0.13.0",
"zone.js": "0.8.19"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.6.8",
"@angular/cli": "^6.0.8",
"@angular/compiler-cli": "^6.0.4",
"@angular/language-service": "^6.0.4",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"angular2-router-loader": "^0.3.4",
"angular2-template-loader": "^0.6.0",
"awesome-typescript-loader": "^3.0.4",
"codelyzer": "~4.0.1",
"css-loader": "^0.25.0",
"file-loader": "^0.11.2",
"innosetup-compiler": "^5.5.9",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-junit-reporter": "^1.2.0",
"ngx-spec": "^0.1.2",
"protractor": "^5.3.0",
"raw-loader": "^0.5.1",
"to-string-loader": "^1.1.4",
"ts-node": "~3.2.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3",
"webpack": "^4.12.1",
"webpack-dev-server": "^3.1.4",
"webpack-merge": "^4.1.3"
} |
Those dependencies should be mentioned in dev dependencies and not in normal dependencies
Could you
and check again? |
@assafshemesh correction: those dependencies should not appear even at dev dependencies. Check my devDependencies from message above |
I removed those 2 dependencies (and indeed they were not required to run the project). |
@smnbbrv Hi, I have same issue with generating spec files. Here is my dependencies of package.json:
Edit: Looks like it does not work on Widows. Tried same from linux subsystem and it worked well |
Aha that’s a really good hint thanks! |
@viktormelnychuk @vateseeb @assafshemesh Could you please check whether the issue is resolved with 0.1.3? |
@smnbbrv Just rechecked. Works on windows. However it assumes I am in the
notice path from where command was run and extra /src/app in the output. File is actually created in src/app/src/app/components/comp/comp.component.spec.ts. Is I run this command from the src/app folder it creates spec file along regular component/service file
|
that's a different story and it corresponds to the design of the angular cli itself. It assumes you are in the src/app folder. Please create another issue and I will close this one then. |
@smnbbrv I do not think that is an issue. But I guess we can just update the Readme to include this info :) |
True, did that. |
When I run
ng g ngx-spec:spec _catalog-explorer/content/zooming/zooming.component
I get an error saying "Unknown Protocol on url "[object Object]"."
The path is correct and the component exists.
The text was updated successfully, but these errors were encountered: