Coder Social home page Coder Social logo

jfoclpf / cordova-import-npm Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 109 KB

Import files from npm packages into your cordova www directory automatically, upon cordova prepare or cordova build

License: GNU General Public License v3.0

JavaScript 100.00%

cordova-import-npm's People

Contributors

jfoclpf avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

cordova-import-npm's Issues

ERR_INVALID_ARG_TYPE when running npx setup-cordova-import-npm

Hi,

I am trying to install cordova-import-npm in my cordova project on Windows.

First I had to run npm install cordova-import-npm multiple times because I got errors regarding failed renames

Logs here:
2021-07-01T10_04_59_498Z-debug.log
2021-07-01T10_04_52_738Z-debug.log

but eventually npm install succeeded.

Now when trying to run npx.cmd setup-cordova-import-npm

I get the following error message:

  Setup script called from undefined
  internal/validators.js:124
      throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
      ^
  
  TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
      at validateString (internal/validators.js:124:11)
      at Object.join (path.js:424:7)
      at Object.<anonymous> (D:\alex\Dropbox\Dropbox\Projects\phonegap\BeginningNFC\NdefReader\node_modules\cordova-import-npm\scripts\setupCordovaImportNpm.js:23:10)
      at Module._compile (internal/modules/cjs/loader.js:1085:14)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
      at Module.load (internal/modules/cjs/loader.js:950:32)
      at Function.Module._load (internal/modules/cjs/loader.js:790:14)
      at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
      at internal/main/run_main_module.js:17:47 {
    code: 'ERR_INVALID_ARG_TYPE'
  }

Thanks!

Universal slashes

Hi,
when you initialize the package, it adds the hook in the config file. However, on Windows, it writes the hook path using "": if you later compile the project on a MacOS (or Linux), the hook will be skipped because it doesn't found the hook.

You should always use the "/" as path separator: it works both on Windows and MacOS (or Linux).

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.