2016-11-11 22 views
1

"npm start"を実行しようとするとエラーが発生します。私はいくつかの許可の問題があるようですが、私はそれを修正する手がかりがなく、おそらく事を台無しにしてしまったので...ノードとNPMを削除することをお勧めします。これは私が得るエラーです。多分誰かが助けることができます...事前に感謝!NPMスタート - 許可エラー

npm start 

> [email protected] start /Users/thomasveit/quickstart 
> tsc && concurrently "tsc -w" "lite-server" 

error TS5033: Could not write file '/Users/thomasveit/quickstart/app/app.component.js': EACCES: permission denied, open '/Users/thomasveit/quickstart/app/app.component.js' 
error TS5033: Could not write file '/Users/thomasveit/quickstart/app/app.component.js.map': EACCES: permission denied, open '/Users/thomasveit/quickstart/app/app.component.js.map' 
error TS5033: Could not write file '/Users/thomasveit/quickstart/app/app.component.spec.js': EACCES: permission denied, open '/Users/thomasveit/quickstart/app/app.component.spec.js' 
error TS5033: Could not write file '/Users/thomasveit/quickstart/app/app.component.spec.js.map': EACCES: permission denied, open '/Users/thomasveit/quickstart/app/app.component.spec.js.map' 
error TS5033: Could not write file '/Users/thomasveit/quickstart/app/app.module.js': EACCES: permission denied, open '/Users/thomasveit/quickstart/app/app.module.js' 
error TS5033: Could not write file '/Users/thomasveit/quickstart/app/app.module.js.map': EACCES: permission denied, open '/Users/thomasveit/quickstart/app/app.module.js.map' 
error TS5033: Could not write file '/Users/thomasveit/quickstart/app/main.js': EACCES: permission denied, open '/Users/thomasveit/quickstart/app/main.js' 
error TS5033: Could not write file '/Users/thomasveit/quickstart/app/main.js.map': EACCES: permission denied, open '/Users/thomasveit/quickstart/app/main.js.map' 
error TS5033: Could not write file '/Users/thomasveit/quickstart/e2e/app.e2e-spec.js': EACCES: permission denied, open '/Users/thomasveit/quickstart/e2e/app.e2e-spec.js' 
error TS5033: Could not write file '/Users/thomasveit/quickstart/e2e/app.e2e-spec.js.map': EACCES: permission denied, open '/Users/thomasveit/quickstart/e2e/app.e2e-spec.js.map' 
app/app.component.spec.ts(4,50): error TS2307: Cannot find module '@angular/core/testing'. 
app/app.component.spec.ts(5,30): error TS2307: Cannot find module '@angular/platform-browser'. 
app/app.component.spec.ts(6,30): error TS2307: Cannot find module '@angular/core'. 
app/app.component.spec.ts(9,1): error TS2304: Cannot find name 'describe'. 
app/app.component.spec.ts(14,3): error TS2304: Cannot find name 'beforeEach'. 
app/app.component.spec.ts(21,3): error TS2304: Cannot find name 'beforeEach'. 
app/app.component.spec.ts(27,3): error TS2304: Cannot find name 'it'. 
app/app.component.spec.ts(27,39): error TS2304: Cannot find name 'expect'. 
app/app.component.spec.ts(29,3): error TS2304: Cannot find name 'it'. 
app/app.component.spec.ts(32,5): error TS2304: Cannot find name 'expect'. 
app/app.component.ts(1,27): error TS2307: Cannot find module '@angular/core'. 
app/app.module.ts(1,31): error TS2307: Cannot find module '@angular/core'. 
app/app.module.ts(2,31): error TS2307: Cannot find module '@angular/platform-browser'. 
app/main.ts(1,40): error TS2307: Cannot find module '@angular/platform-browser-dynamic'. 
e2e/app.e2e-spec.ts(1,38): error TS2307: Cannot find module 'protractor'. 
e2e/app.e2e-spec.ts(3,1): error TS2304: Cannot find name 'describe'. 
e2e/app.e2e-spec.ts(7,3): error TS2304: Cannot find name 'beforeEach'. 
e2e/app.e2e-spec.ts(11,3): error TS2304: Cannot find name 'it'. 
e2e/app.e2e-spec.ts(12,5): error TS2304: Cannot find name 'expect'. 

npm ERR! Darwin 16.0.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 
npm ERR! node v6.9.1 
npm ERR! npm v3.10.8 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `tsc && concurrently "tsc -w" "lite-server" ` 
npm ERR! Exit status 2 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'tsc && concurrently "tsc -w" "lite-server" '. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the angular-quickstart package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  tsc && concurrently "tsc -w" "lite-server" 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular-quickstart 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls angular-quickstart 
npm ERR! There is likely additional logging output above. 
npm WARN Local package.json exists, but node_modules missing, did you mean to install? 
npm ERR! Darwin 16.0.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 
npm ERR! node v6.9.1 
npm ERR! npm v3.10.8 
npm ERR! path npm-debug.log.884692043 
npm ERR! code EACCES 
npm ERR! errno -13 
npm ERR! syscall open 

npm ERR! Error: EACCES: permission denied, open 'npm-debug.log.884692043' 
npm ERR!  at Error (native) 
npm ERR! { Error: EACCES: permission denied, open 'npm-debug.log.884692043' 
npm ERR!  at Error (native) 
npm ERR! errno: -13, 
npm ERR! code: 'EACCES', 
npm ERR! syscall: 'open', 
npm ERR! path: 'npm-debug.log.884692043' } 
npm ERR! 
npm ERR! Please try running this command again as root/Administrator. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/thomasveit/quickstart/npm-debug.log 

答えて

1

package.jsonファイルのコピーを提供できますか?まるであなたが何かを正しく設定しなかったかのように見えるからです。

+0

これは、角度クイックスタートプロジェクトの正確なものです:https://github.com/angular/quickstart/blob/master/package .json 私は何も変更していません... – Tommy

1

これは、プロジェクトを設定したディレクトリのアクセス許可の問題のようです。 /ユーザ/ thomasveit/quickstart/

これは少し壊れている可能性があるので、新しいディレクトリを作成するのが最も簡単なことかもしれません。アクセス権を(再帰的に)広く設定してから、すべてを新しい場所にコピーしてから、もう一度実行してください。または、現在のディレクトリで同じことを試すこともできます。

したい場合は、経由して、Windowsエクスプローラ経由でフォルダにアクセス許可を設定することができますフォルダを右クリックし - > [プロパティ] - > [セキュリティ]タブ に左下にあるチェックボックスをクリックし、すべての子の許可を取り付けこのオブジェクトからの継承可能なアクセス許可エントリを持つエントリ

それとも、あなたはこのような何かがうまくいくかもしれない、フォルダー上のコマンドラインを実行できます。 ます。icacls "C:\ Users \ユーザーthomasveit \クイックスタート\"/T/G

問題の原因を突き止めようとしている場合は、「npm runサーバーが動くことができるかどうかを知るために "lite"? npmの開始コマンドで並行コマンドを実行するのではなく、エラーに対する混乱の可能性が高まります。

0

ありがとうございました!私はnpmのクリーンなキャッシュを実行し、ノード7.1.0をインストールしてからもう一度やり直しました...