denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
93.89k stars 5.22k forks source link

Support `github:` specifiers in dependencies and package.json #18478

Open TrashP4nda opened 1 year ago

TrashP4nda commented 1 year ago

When importing npm package:

error: npm package: @taquito/http-utils@16.0.0

Caused by:
    0: error parsing version requirement for dependency: @vespaiach/axios-fetch-adapter@github:ecadlabs/axios-fetch-adapter
    1: Invalid npm version requirement. Unexpected character.
         github:ecadlabs/axios-fetch-adapter
         ~
    2: Unexpected character.
         github:ecadlabs/axios-fetch-adapter
         ~
abflow commented 1 year ago

It seems that like the file: specifier(https://github.com/denoland/deno/issues/18474), the github: specifier in package.json is not yet implemented by Deno.

dsherret commented 1 year ago

@TrashP4nda what version of Deno are you using? Those errors should be surfaced lazily now only when you go to use the bare specifier.

grcq commented 1 year ago

I have the same problem. I have created an express webserver in my index file, trying to run it with Deno run -A .\index.ts but I get this:

error: Parsing version constraints in the application-level package.json is more strict at the moment.

Invalid npm specifier version requirement. Unexpected character.
  github:mysqljs/mysql
  ~
    at file:///C:/Users/.../Documents/GitHub/panel/server/index.ts:2:19

I have no idea what's causing this, but these are my imports:

import express from 'express';
import mysql from 'mysql';

import cors from 'cors';
import bodyParser from 'body-parser';

import data from '../src/utils/Data'

I just upgraded to the latest version of Deno too.

deno 1.32.1 (release, x86_64-pc-windows-msvc)
v8 11.2.214.9
typescript 5.0.2
dsherret commented 1 year ago

I misread the initial error message as the github: specifier is in a dependency published to npm. I updated the title.

Basically, Deno doesn't have support for github: specifiers at the moment.

TrashP4nda commented 1 year ago

@TrashP4nda what version of Deno are you using? Those errors should be surfaced lazily now only when you go to use the bare specifier.

Uhh , sorry I forgot about posting the version I was using.

deno 1.32.1 (release, x86_64-unknown-linux-gnu)
v8 11.2.214.9
typescript 5.0.2

I misread the initial error message as the github: specifier is in a dependency published to npm. I updated the title.

Basically, Deno doesn't have support for github: specifiers at the moment.

Thanks for the reply.

jlucaso1 commented 7 months ago

The library Baileys need this to work out of the box