angular2-cookie icon indicating copy to clipboard operation
angular2-cookie copied to clipboard

v1.2.6 Does not work with Rollup.js

Open lfarran opened this issue 8 years ago • 1 comments

With Angular 4.0.0 rollup AOT builds:

{ Error: 'CookieService' is not exported by node_modules/angular2-cookie/core.js at error (node_modules/rollup/src/utils/error.js:2:14) at Module.error$1 [as error] (/node_modules/rollup/src/Module.js:303:2) at Module.trace (/node_modules/rollup/src/Module.js:400:10) at ModuleScope.findDeclaration (/node_modules/rollup/src/ast/scopes/ModuleScope.js:52:22) at Identifier.bind (/node_modules/rollup/src/ast/nodes/Identifier.js:22:29) at /node_modules/rollup/src/ast/Node.js:6:34 at ArrayExpression.eachChild (/node_modules/rollup/src/ast/Node.js:18:20) at ArrayExpression.bind (/node_modules/rollup/src/ast/Node.js:6:8) at /node_modules/rollup/src/ast/Node.js:6:34 at Node.eachChild (/node_modules/rollup/src/ast/Node.js:21:5) code: 'MISSING_EXPORT', url: 'https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module', pos: 781, loc:

lfarran avatar Mar 27 '17 18:03 lfarran

Work around: Change: import { CookieService } from 'angular2-cookie/core';

To: import { CookieService } from 'angular2-cookie/services';

lfarran avatar Mar 27 '17 18:03 lfarran