我已经尝试在我的项目中为 Angular 安装 CASL。不幸的是,当我尝试启动应用程序时,我收到以下错误消息:
ERROR in /Users/julien/Documents/repositories/frontend/node_modules/@casl/angular/__ivy_ngcc__/dist/es6/index.js
Module build failed (from /Users/julien/Documents/repositories/frontend/node_modules/babel-loader/lib/index.js):
TypeError: /Users/julien/Documents/repositories/frontend/node_modules/@casl/angular/__ivy_ngcc__/dist/es6/index.js: Column must be greater than or equal to 0, got -21
at BasicSourceMapConsumer.SourceMapConsumer_findMapping [as _findMapping] (/Users/julien/Documents/repositories/frontend/node_modules/source-map/lib/source-map-consumer.js:543:13)
at BasicSourceMapConsumer.SourceMapConsumer_allGeneratedPositionsFor [as allGeneratedPositionsFor] (/Users/julien/Documents/repositories/frontend/node_modules/source-map/lib/source-map-consumer.js:201:22)
at /Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transformation/file/merge-map.js:186:27
at Array.forEach (<anonymous>)
at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (/Users/julien/Documents/repositories/frontend/node_modules/source-map/lib/source-map-consumer.js:155:14)
at buildMappingData (/Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transformation/file/merge-map.js:147:12)
at mergeSourceMap (/Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transformation/file/merge-map.js:21:17)
at generateCode (/Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transformation/file/generate.js:74:39)
at run (/Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transformation/index.js:55:33)
at run.next (<anonymous>)
at Function.transform (/Users/julien/Documents/repositories/frontend/node_modules/@babel/core/lib/transform.js:27:41)
at transform.next (<anonymous>)
at step (/Users/julien/Documents/repositories/frontend/node_modules/gensync/index.js:254:32)
at /Users/julien/Documents/repositories/frontend/node_modules/gensync/index.js:266:13
at async.call.result.err.err (/Users/julien/Documents/repositories/frontend/node_modules/gensync/index.js:216:11)
我正在使用最新版本的角度“10.0.9”。如果我完全禁用源映射,则消息会消失,但在开发过程中它并不是一个真正的选择。
有任何想法吗 ?