Closed aemaghrabi closed 8 years ago
Try using CMD with administrator privileges.
If you update to beta.6 of the CLI, you shouldn't have this problem. See https://github.com/angular/angular-cli#updating-angular-cli
@filipesilva @ketulrastogi I'm still facing the same error, Also I'm running CMD as administrator and installed the last version of angular-cli.
Here 2 screenshot for build command and serve command.
Did you fully follow the upgrade guide as per my previous comment?
Yes, @filipesilva Also tried to create new project, and the same problem happen with each project I create.
Also here a package.json file and screenshot of nodejs and angular-cli global version of the project package, nodejs version and angular-cli verstion.
{
"name": "ang-cli",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"postinstall": "typings install",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "2.0.0-rc.1",
"@angular/http": "2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"@angular/router": "3.0.0-alpha.3",
"es6-shim": "0.35.1",
"reflect-metadata": "0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "0.19.26",
"zone.js": "0.6.12"
},
"devDependencies": {
"angular-cli": "1.0.0-beta.6",
"codelyzer": "0.0.20",
"ember-cli-inject-live-reload": "1.4.0",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "0.13.22",
"karma-chrome-launcher": "0.2.3",
"karma-jasmine": "0.3.8",
"protractor": "3.3.0",
"ts-node": "0.5.5",
"tslint": "3.11.0",
"typescript": "1.8.10",
"typings": "0.8.1"
}
}
This is my log from running these commands using git bash:
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox
$ ng -v
fatal: ref HEAD is not a symbolic ref
angular-cli: local (v1.0.0-beta.6, branch: ??)
node: 5.11.1
os: win32 x64
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox
$ ng new symlink-test
installing ng2
create .editorconfig
create README.md
create src\app\app.component.css
create src\app\app.component.html
create src\app\app.component.spec.ts
create src\app\app.component.ts
create src\app\environment.ts
create src\app\index.ts
create src\app\shared\index.ts
create src\favicon.ico
create src\index.html
create src\main.ts
create src\system-config.ts
create src\tsconfig.json
create src\typings.d.ts
create angular-cli-build.js
create angular-cli.json
create config\environment.dev.ts
create config\environment.js
create config\environment.prod.ts
create config\karma-test-shim.js
create config\karma.conf.js
create config\protractor.conf.js
create e2e\app.e2e-spec.ts
create e2e\app.po.ts
create e2e\tsconfig.json
create e2e\typings.d.ts
create .gitignore
create package.json
create public\.gitignore
create public\.npmignore
create tslint.json
create typings.json
Successfully initialized git.
- Installing packages for tooling via npm
(No dependencies)
\ Installing packages for tooling via npm
├── es6-shim (ambient)
├── angular-protractor (ambient dev)
├── jasmine (ambient dev)
└── selenium-webdriver (ambient dev)
Installed packages for tooling via npm.
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/symlink-test (master)
$ ng build
Running without elevated rights. Running Ember CLI "as Administrator" increases performance significantly.
See ember-cli.com/user-guide/#windows for details.
Built project successfully. Stored in "dist/".
I also tried running it from windows command prompt:
E:\sandbox\symlink-test>ng build
Running without elevated rights. Running Ember CLI "as Administrator" increases
performance significantly.
See ember-cli.com/user-guide/#windows for details.
Built project successfully. Stored in "dist/".
Did you do something different from what I did? This was on Windows 10.
There's something really weird here... you're getting a symlink error - but admin permissions should allow you to symlink.
But you're also getting a EISDIR
error... meaning that something is a directory, but a file was expected (I think).
Very weird.... does f:\Work\Upwork\Tony Capoli\
have some special permissions set or something? Can you maybe give me a repo where this happens that I can clone and repro?
@filipesilva
I think the only difference is the verstion of nodejs and of course the build error, here the result after apply ng -v
command
angular-cli: 1.0.0-beta.6
node: 6.2.2
os: win32 x64
Also path f:\Work\Upwork\Tony Capoli\
dose not has any special permissions, it's just normal path for filter my project by client.
And I want to mention, if that make problem, drive f:\
is encrypted using windows BitLocker.
Any way this is a repo for the project: https://github.com/EgyTechnology/test-ang-cli
I have the same issue with a different nodejs version:
angular-cli: 1.0.0-beta.6 node: 5.6.0 os: win32 x64
I tried angular-cli@1.0.0-beta.4 by issuing npm install -g angular-cli@1.0.0-beta.4 I but got the same error. What the hell is The Broccoli Plugin?
I get the same problem on a Mac after following the instructions to reinstall angular-cli, re-run ng init etc.
My environment: angular-cli: 1.0.0-beta.8 node: 4.4.3 os: darwin x64
I had to change line 414 in angular-cli/lib/broccoli/broccoli-typescript.js to look like this to skip directories: if (!fs.existsSync(absoluteTsFilePath) || fs.statSync(absoluteTsFilePath).isDirectory()) {
I can fork and do a PR if you want.
Actually, my issue went away after a few more iterations over the instructions. If it crops up again, I'll try to gather more detail.
I got it again. Here is more data:
We are trying to use the same techniques Angular is using with an @ name for our library and then using the paths entry in tsconfig.json to allow our code inside our library to use @library/whatever in our imports, just like an external user would.
When I tried to use import {Something} from '@library/core'; in my code, tsc --watch is happy, but ng build is not, giving me the error.
In our tsconfig.json, paths looks like this: "paths": { "@library/": [ "./" ] }
And the error I get from ng build (broccoli-typescript.js) is this (I added logging to print the directory name): CustomLanguageServiceHost.getScriptSnapshot(): absoluteTSFilePath = [/Users/hoytk/git/library/tmp/broccoli_type_script_compiler-input_base_path-I0dQTsQq.tmp/0/src/core]
where src/core is what @library/core gets translated into (correctly), but it's trying to run the compiler on the actual directory rather than the files in the directory.
Don't know if this helps pinpoint the problem, but in my case, it makes it happen every time.
angular-cli: 1.0.0-beta.8 node: 4.4.3 os: darwin x64
Hello guys, I found that CLI work perfectly under c:/
drive only
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Hi, guys This is my first time using angular-cli for create Angular2 applications, and when I do first serve I have got this error:
Note: I'm using Windows 10, NPM version is 3.9.6 and NodeJs version is 6.2.2