question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'deflate' is not exported by node_modules\pako\dist\pako_deflate.js

See original GitHub issue

Type of Issue

[x] Support Request

Description

After running npm run packagr I get this error

PS C:\Projects\EYC\SDK\Eyc.Sdk.Ui\eyc.control.grid-filter> npm run packagr

> eyc.control.grid-filter@2.0.0 packagr C:\Projects\EYC\SDK\Eyc.Sdk.Ui\eyc.control.grid-filter
> ng-packagr -p ng-package.json

Building Angular library
Generating bundle for eyc.control.grid-filter
Cleaning bundle build directory
Processing assets
Running ngc
Compiling to FESM15

BUILD ERROR
'deflate' is not exported by node_modules\pako\dist\pako_deflate.js
Error: 'deflate' is not exported by node_modules\pako\dist\pako_deflate.js
    at error (C:\Projects\EYC\SDK\Eyc.Sdk.Ui\eyc.control.grid-filter\node_modules\rollup\dist\rollup.js:185:14)
    at Module.error (C:\Projects\EYC\SDK\Eyc.Sdk.Ui\eyc.control.grid-filter\node_modules\rollup\dist\rollup.js:16526:3)
    at Module.trace (C:\Projects\EYC\SDK\Eyc.Sdk.Ui\eyc.control.grid-filter\node_modules\rollup\dist\rollup.js:16623:10)
    at ModuleScope.findVariable (C:\Projects\EYC\SDK\Eyc.Sdk.Ui\eyc.control.grid-filter\node_modules\rollup\dist\rollup.js:13965:22)
    at Node._bindVariableIfMissing (C:\Projects\EYC\SDK\Eyc.Sdk.Ui\eyc.control.grid-filter\node_modules\rollup\dist\rollup.js:12626:31)
    at Node.bindNode (C:\Projects\EYC\SDK\Eyc.Sdk.Ui\eyc.control.grid-filter\node_modules\rollup\dist\rollup.js:12621:8)
    at Node.bind (C:\Projects\EYC\SDK\Eyc.Sdk.Ui\eyc.control.grid-filter\node_modules\rollup\dist\rollup.js:11005:8)
    at eachChild.child (C:\Projects\EYC\SDK\Eyc.Sdk.Ui\eyc.control.grid-filter\node_modules\rollup\dist\rollup.js:11024:34)
    at keys.forEach.key (C:\Projects\EYC\SDK\Eyc.Sdk.Ui\eyc.control.grid-filter\node_modules\rollup\dist\rollup.js:11041:5)
    at Array.forEach (<anonymous>)

Version Information

ng-packagr: v1.6.0
node: v8.7.0
@angular: v5.0.2
rxjs: 5.5.2
zone.js: 0.8.18

please include any version information that might be relevant, e.g. other third-party libraries

Is it a problem with pako package?

Thank you.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:23 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Kalemstorm94commented, Feb 13, 2018

Thank you, but still the same problem. I’ve solved this by changing the library creation method. I’ve followed this tutorial (https://www.usefuldev.com/blog/post/publishing-a-library-from-an-angular-cli-project) and everything worked perfectly.

1reaction
DavidParks8commented, Nov 22, 2017

You also might need to change your import to be:

import * as pakoImport from 'pako/dist/pako_deflate';
// note that I'm specifically not using "pako" as the import alias

export const deflate = pakoImport.deflate;
Read more comments on GitHub >

github_iconTop Results From Across the Web

Rollup Error: 'default' is not exported by node_modules/react ...
js but I have trouble regarding the plugin @rollup/plugin-commonjs. My rollup.conf.js. import resolve from '@rollup/plugin-node-resolve'; ...
Read more >
ES6 Modules and How to Use Import and Export in JavaScript
You can export members one by one. What's not exported won't be available directly outside the module: export const myNumbers = [ ...
Read more >
export - JavaScript - MDN Web Docs
The export declaration is used to export values from a JavaScript module. Exported values can then be imported into other programs with the ......
Read more >
Testing Non-Exported Functions in JavaScript - Samantha Ming
To test exported function, you can simply import it. But what about non-exported functions? Well that's easy too, thanks to Rewire!
Read more >
Zlib | Node.js v19.3.0 Documentation
Compression and decompression are built around the Node.js Streams API. ... Added in: v0.5.8. Compress data using deflate, and do not append a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found