我尝试在我的项目中为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”。如果我完全禁用了源映射,则消息消失,但是在开发过程中并不是真正的选择。
有什么想法吗?
答案 0 :(得分:0)
这是@ casl / angular中带有源地图生成的错误,该错误已在@ casl / angular @ 4.1.5中修复
现在,它可以正常工作