Giter Club home page Giter Club logo

ietf-language-tags's People

Contributors

dependabot[bot] avatar opyh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

fluenticltd

ietf-language-tags's Issues

Fails to install

npm install --save @sozialhelden/ietf-language-tags

> @sozialhelden/[email protected] postinstall /Users/project/functions/node_modules/@sozialhelden/ietf-language-tags
> cp -r ./node_modules/language-subtag-registry/data/json ./src

cp: ./node_modules/language-subtag-registry/data/json: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @sozialhelden/[email protected] postinstall: `cp -r ./node_modules/language-subtag-registry/data/json ./src`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @sozialhelden/[email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Doesn't work even if I install language-subtag-registry separately on the same directory.

package.json has broken links for `module` and `types` property

TypeScript fails to work properly with this package at the moment because the module and types property of the distributed package.json are pointing to non-existent properties.

(PR to come later)

Workarounds

Add a (temporary) path binding to the proper file

When you upgrade your packages later on, this shouldn't break anything, and requires no modification of your code or the installed package.

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es6",
    "outDir": "dist",
    "rootDir": ".",
    "sourceMap": true,
    "strict": false,
    "esModuleInterop": true,
    "paths": {
      "@sozialhelden/ietf-language-tags": [
        "./node_modules/@sozialhelden/ietf-language-tags/dist/esm/index.js"
      ],
    }
  }
}

Reference the esm module directly from your code

This has the undesirable side effect of adding many ../../ to your code...

import {
	normalizeLanguageTagCasing,
	parseLanguageTag,
} from '../../node_modules/@sozialhelden/ietf-language-tags/dist/esm/';

Update the installed package

If you update node_modules/@sozialhelden/ietf-language-tags/package.json to use the esm outputs, typescript works properly, but this affects the ability to use npm install, so it may not be preferable, esp in CI/CD environments.

{
   "module": "dist/esm/index.js",
   "types": "./dist/esm/index.d.ts"
}

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.