EPERM:不允许操作,状态为“ D:\ Angular \ Project \ node_modules \ @angular \ material \ material.d.ts”

时间:2018-08-25 17:46:48

标签: angular typescript angular-material stat

EPERM中的错误:不允许操作,状态为'D:\ Angular \ Project \ node_modules \ @angular \ material \ material.d.ts'

./ src / app / app.module.ts中的错误

模块构建失败:错误:EPERM:不允许操作,统计信息'D:\ Angular \ Project \ node_modules \ @angular \ material \ material.d.ts'

at Object.fs.statSync (fs.js:948:11)
at Object.statSync (D:\Angular\Project\node_modules\graceful-fs\polyfills.js:297:22)
at Storage.provideSync (D:\Angular\Project\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:98:13)
at CachedInputFileSystem.statSync (D:\Angular\Project\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:251:28)
at Observable.rxjs_1.Observable.obs [as _subscribe] (D:\Angular\Project\node_modules\@ngtools\webpack\src\webpack-input-host.js:70:52)
at Observable._trySubscribe (D:\Angular\Project\node_modules\rxjs\internal\Observable.js:43:25)
at Observable.subscribe (D:\Angular\Project\node_modules\rxjs\internal\Observable.js:29:22)
at MapOperator.call (D:\Angular\Project\node_modules\rxjs\internal\operators\map.js:29:23)
at Observable.subscribe (D:\Angular\Project\node_modules\rxjs\internal\Observable.js:24:22)
at SyncDelegateHost._doSyncCall (D:\Angular\Project\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:22:20)
at SyncDelegateHost.exists (D:\Angular\Project\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:61:21)
at WebpackCompilerHost.fileExists (D:\Angular\Project\node_modules\@ngtools\webpack\src\compiler_host.js:195:44)
at tryFile (D:\Angular\Project\node_modules\typescript\lib\typescript.js:24075:28)
at loadModuleFromPackageJson (D:\Angular\Project\node_modules\typescript\lib\typescript.js:24157:24)
at loadNodeModuleFromDirectoryWorker (D:\Angular\Project\node_modules\typescript\lib\typescript.js:24098:53)
at loadModuleFromNodeModulesFolder (D:\Angular\Project\node_modules\typescript\lib\typescript.js:24214:13)

我「wdm」:编译失败。

1 个答案:

答案 0 :(得分:0)

  1. 删除node_modules文件夹
  2. 运行npm cache clean --force
  3. 运行npm install --no-bin-links

read this for more info