node-pureimage icon indicating copy to clipboard operation
node-pureimage copied to clipboard

Error: export 'make' (imported as 'PImage') was not found in 'pureimage' (module has no exports)

Open madmacc opened this issue 2 years ago • 7 comments

Expected Behaviour

This was working fine in my Angular 10 project using: import * as PImage from "pureimage"

Actual Behaviour

In Angular 16 I get the following error However the package actually works as expected. export 'make' (imported as 'PImage') was not found in 'pureimage' (module has no exports)

Steps To Reproduce

npm i pureimage import * as PImage from "pureimage" const img1: Bitmap = PImage.make(imgFrameWidth, imgFrameHeight, null);

Platform

OS: Windows 10 Node Version: 16.20.0 NPM Version: 9.7.6 PureImage Version: 0.3.17

madmacc avatar Jun 08 '23 21:06 madmacc

Same as. Windows 11 Node v18.17.0 NPM 9.8.1 PureImage Version: ^0.4.8

CuAnnan avatar Aug 24 '23 22:08 CuAnnan

First I want to say I had no idea how many people are using PureImage and I'm very sorry I broke it.

Next: The source of the breakage was me trying to set up a CI system with Github Actions.

I've just published 0.4.13. Could you try that out and let me know if that fixes it?

joshmarinacci avatar Oct 17 '23 00:10 joshmarinacci

@joshmarinacci I get the following error now. Cannot find module 'pureimage' or its corresponding type declarations

image

madmacc avatar Oct 17 '23 01:10 madmacc

could you send me your package.JSON file?

joshmarinacci avatar Oct 18 '23 22:10 joshmarinacci

could you send me your package.JSON file?

I just tried again and it worked. It must have been a random VSCode thing. However I am now getting the error: Error: export 'make' (imported as 'PImage') was not found in 'pureimage' (module has no exports) .make does come up in intellisense

import * as PImage from "pureimage";
import { Bitmap } from 'pureimage';
//
const img1: Bitmap = PImage.make(imgFrameWidth, imgFrameHeight);

madmacc avatar Oct 19 '23 04:10 madmacc

I recently redid the packaging because the types were missing. Can see see if it works now?

joshmarinacci avatar Nov 17 '23 04:11 joshmarinacci

I recently redid the packaging because the types were missing. Can see see if it works now?

@joshmarinacci Sorry for the delay in getting back. The version in npmjs is still 0.4.13. I uninstalled and reinstalled but get the same error above. Error: export 'make' (imported as 'PImage') was not found in 'pureimage' (module has no exports)

I forgot to mention I was using this in Angular not Node above.

Here is my package.json

"private": true,
  "dependencies": {
    "@angular/animations": "^16.0.0",
    "@angular/cdk": "^16.0.3",
    "@angular/common": "^16.0.0",
    "@angular/compiler": "^16.0.0",
    "@angular/core": "^16.0.0",
    "@angular/fire": "^7.6.1",
    "@angular/forms": "^16.0.0",
    "@angular/material": "^16.0.3",
    "@angular/platform-browser": "^16.0.0",
    "@angular/platform-browser-dynamic": "^16.0.0",
    "@angular/router": "^16.0.0",
    "@fortawesome/angular-fontawesome": "^0.13.0",
    "@fortawesome/fontawesome-svg-core": "^6.4.0",
    "@fortawesome/free-brands-svg-icons": "^6.4.0",
    "@fortawesome/free-regular-svg-icons": "^6.4.0",
    "@fortawesome/free-solid-svg-icons": "^6.4.0",
    "@json2csv/plainjs": "^7.0.1",
    "@ng-bootstrap/ng-bootstrap": "^15.0.1",
    "@ng-select/ng-select": "^11.0.0",
    "@popperjs/core": "^2.11.8",
    "@types/chart.js": "^2.9.37",
    "@types/faker": "^6.6.9",
    "@types/googlemaps": "^3.43.3",
    "@types/intro.js": "^5.1.1",
    "@types/stripe-v3": "^3.1.28",
    "@usermaven/sdk-js": "^1.2.4",
    "angular-animations": "^0.11.0",
    "bootstrap": "^5.3.0",
    "chart.js": "^4.3.0",
    "class-transformer": "^0.5.1",
    "colorthief": "^2.4.0",
    "country-to-currency": "^1.0.10",
    "csvtojson": "^2.0.10",
    "download.js": "^1.0.0",
    "faker": "^6.6.6",
    "file-saver": "^2.0.5",
    "firebase": "^9.22.1",
    "hammerjs": "^2.0.8",
    "html2pdf.js": "^0.10.1",
    "i18n-iso-countries": "^7.6.0",
    "intro.js": "^7.0.1",
    "keyword-extractor": "^0.0.25",
    "merge-images": "^2.0.0",
    "moment": "^2.29.4",
    "moment-timezone": "^0.5.43",
    "ng2-charts": "^4.1.1",
    "ng2-fittext": "^1.3.0",
    "ngx-color-picker": "^14.0.0",
    "ngx-hotjar": "^11.0.0",
    "ngx-image-cropper": "^7.0.2",
    "ngx-infinite-scroll": "^16.0.0",
    "ngx-pipes": "^3.2.2",
    "ngx-popperjs": "^16.0.0",
    "ngx-slider-v2": "^16.0.0",
    "ngx-spinner": "^16.0.2",
    "ngx-toastr": "^17.0.2",
    "pdfmake": "^0.2.7",
    "pureimage": "^0.4.13",
    "rgb-hex": "^4.0.1",
    "rxjs": "^7.8.1",
    "styled-qr-code": "^1.0.0",
    "sweetalert2": "^11.7.11",
    "text-to-image": "^5.2.0",
    "tinycolor2": "^1.6.0",
    "tslib": "^2.5.3",
    "voucher-code-generator": "^1.3.0",
    "wcag-contrast": "^3.0.0",
    "zone.js": "^0.13.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^16.0.4",
    "@angular/cli": "~16.0.4",
    "@angular/compiler-cli": "^16.0.0",
    "@types/file-saver": "^2.0.5",
    "@types/jasmine": "~4.3.0",
    "jasmine-core": "~4.6.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.2.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.0.0",
    "typescript": "~5.0.2"
  }
}

madmacc avatar Dec 14 '23 18:12 madmacc