Skip to content
This repository was archived by the owner on Jun 15, 2024. It is now read-only.

[Webpack] Unable to compile using webpack #16

Closed
echap opened this issue Mar 1, 2017 · 3 comments
Closed

[Webpack] Unable to compile using webpack #16

echap opened this issue Mar 1, 2017 · 3 comments

Comments

@echap
Copy link

echap commented Mar 1, 2017

The plugin is not usable with webpack, maybe the package.json should be updated ?

{
  "_args": [
    [
      {
        "raw": "nativescript-pdf-view@^1.2.1",
        "scope": null,
        "escapedName": "nativescript-pdf-view",
        "name": "nativescript-pdf-view",
        "rawSpec": "^1.2.1",
        "spec": ">=1.2.1 <2.0.0",
        "type": "range"
      },
      "/home/eric-hubup/projects/hubup-nativescript-ivy"
    ]
  ],
  "_from": "nativescript-pdf-view@>=1.2.1 <2.0.0",
  "_id": "nativescript-pdf-view@1.2.1",
  "_inCache": true,
  "_location": "/nativescript-pdf-view",
  "_nodeVersion": "5.12.0",
  "_npmOperationalInternal": {
    "host": "packages-12-west.internal.npmjs.com",
    "tmp": "tmp/nativescript-pdf-view-1.2.1.tgz_1486825626805_0.6759080195333809"
  },
  "_npmUser": {
    "name": "merott",
    "email": "npm@merott.com"
  },
  "_npmVersion": "3.8.6",
  "_phantomChildren": {},
  "_requested": {
    "raw": "nativescript-pdf-view@^1.2.1",
    "scope": null,
    "escapedName": "nativescript-pdf-view",
    "name": "nativescript-pdf-view",
    "rawSpec": "^1.2.1",
    "spec": ">=1.2.1 <2.0.0",
    "type": "range"
  },
  "_requiredBy": [
    "/"
  ],
  "_resolved": "https://registry.npmjs.org/nativescript-pdf-view/-/nativescript-pdf-view-1.2.1.tgz",
  "_shasum": "7ce2c02f52b714723da0de369d9685d5c9733143",
  "_shrinkwrap": null,
  "_spec": "nativescript-pdf-view@^1.2.1",
  "_where": "/home/eric-hubup/projects/hubup-nativescript-ivy",
  "author": {
    "name": "Merott Movahedi",
    "email": "merott@merott.com"
  },
  "bugs": {
    "url": "https://github.com/Merott/nativescript-pdf-view/issues"
  },
  "dependencies": {},
  "description": "A NativeScript plugin to display PDF files on iOS and Android",
  "devDependencies": {
    "@semantic-release/condition-codeship": "1.1.0",
    "@semantic-release/release-notes-generator": "2.0.0",
    "semantic-release": "6.3.2",
    "tns-core-modules": "2.5.0",
    "tns-platform-declarations": "2.5.0",
    "tslint": "4.4.2",
    "typescript": "2.1.6"
  },
  "directories": {},
  "dist": {
    "shasum": "7ce2c02f52b714723da0de369d9685d5c9733143",
    "tarball": "https://registry.npmjs.org/nativescript-pdf-view/-/nativescript-pdf-view-1.2.1.tgz"
  },
  "gitHead": "18ac92ce3db4237f9e1b34428e9e547e8b9126ec",
  "homepage": "https://github.com/Merott/nativescript-pdf-view",
  "keywords": [
    "NativeScript",
    "JavaScript",
    "Android",
    "iOS",
    "PDF",
    "View"
  ],
  "license": "MIT",
  "main": "src/plugin.js",  // This main is incorrect
  "maintainers": [
    {
      "name": "merott",
      "email": "npm@merott.com"
    }
  ],
  "name": "nativescript-pdf-view",
  "nativescript": {},
  "optionalDependencies": {},
  "readme": "ERROR: No README data found!",
  "release": {
    "generateNotes": "./node_modules/@semantic-release/release-notes-generator",
    "verifyConditions": [
      "./node_modules/@semantic-release/condition-codeship"
    ]
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/Merott/nativescript-pdf-view.git"
  },
  "scripts": {
    "build": "tsc",
    "build:watch": "tsc --watch",
    "demo.android": "npm run preparedemo && cd demo && tns run android",
    "demo.ios": "npm run preparedemo && cd demo && tns emulate ios",
    "preparedemo": "npm run build && cd demo && tns plugin remove nativescript-pdf-view && tns plugin add .. && tns install",
    "prepublish": "npm run build",
    "semantic-release": "semantic-release pre && npm publish && ./node_modules/.bin/semantic-release post",
    "setup": "npm install && cd demo && npm install && cd .. && npm run build && cd demo && tns plugin add .. && cd .."
  },
  "version": "1.2.1"
}
@imaginationcoder
Copy link

+1
getting below error while bundling with web-pack

ERROR in ./pages/kid/forms-and-docs/form.or.doc.webview.component.ts
Module not found: Error: Can't resolve 'nativescript-pdf-view' in '/Users/maisapride7/workspace/KIDSAPP/tingr-ns-app/app/pages/kid/forms-and-docs'
 @ ./pages/kid/forms-and-docs/form.or.doc.webview.component.ts 12:0-32
 @ ./app.module.ngfactory.ts
 @ ./main.aot.ts

@imaginationcoder
Copy link

imaginationcoder commented Mar 20, 2017

@Merott can you please help me on above for web-pack bundle

@Merott Merott closed this as completed in 1bf80c7 May 21, 2017
@Merott
Copy link
Owner

Merott commented May 21, 2017

I believe any webpack bundling issues should be resolved in the just released version 2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants