-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v64 breaks Deno bundling with protobufjs #256
Comments
I think I also have problem with mentioned change, this works fine import mapboxgl from "https://esm.sh/[email protected]?pin=v63"; but this throws import mapboxgl from "https://esm.sh/[email protected]?pin=v64"; X [ERROR] Expected "from" but found "{"
deno-url:https://deno.land/[email protected]/node/process.ts:36:12:
36 │ import type { BindingName } from "./internal_binding/mod.ts";
│ ^
╵ from
fatal error: error: Uncaught (in promise) Error: Build failed with 1 error:
deno-url:https://deno.land/[email protected]/node/process.ts:36:12: ERROR: Expected "from" but found "{"
let error = new Error(`${text}${summary}`);
^
at failureErrorWithLog (https://deno.land/x/[email protected]/mod.js:1521:15)
at https://deno.land/x/[email protected]/mod.js:1179:28
at runOnEndCallbacks (https://deno.land/x/[email protected]/mod.js:967:63)
at buildResponseToResult (https://deno.land/x/[email protected]/mod.js:1177:7)
at https://deno.land/x/[email protected]/mod.js:1286:14
at https://deno.land/x/[email protected]/mod.js:599:9
at handleIncomingPacket (https://deno.land/x/[email protected]/mod.js:696:9)
at readFromStdout (https://deno.land/x/[email protected]/mod.js:566:7)
at https://deno.land/x/[email protected]/mod.js:1794:11
The terminal process "C:\Users\Xeevis\.dev\deno.EXE 'run', '--allow-all', '--unstable', 'build.ts'" terminated with exit code: 1. |
if you are bundling code for browsers or nodejs, try to use https://esm.sh/PACKAGE?target=2021 instead |
Swapping import 'https://esm.sh/protobufjs?pin=v63'; to import 'https://esm.sh/protobufjs?target=2021'; Produces the same problems as before. |
Same issue here as well. @ije should the query string take absolute priority? Because it appears that is not the case. Deno will cache "deno production" build every single time from within VS Code, Starting Deno language server...
version: 1.18.0 (release, x86_64-pc-windows-msvc)
executable: C:\Users\Xeevis\.dev\deno.EXE
Connected to "Visual Studio Code" 1.63.2
Enabling import suggestions for: https://deno.land
Enabling import suggestions for: https://x.nest.land
Download https://x.nest.land/.well-known/deno-import-intellisense.json
Download https://intellisense.nest.land/deno-import-intellisense.json
Enabling import suggestions for: https://crux.land
language server initialized
Server ready.
+ Download https://esm.sh/[email protected]?target=es2021
- Download https://cdn.esm.sh/v64/[email protected]/deno/mapbox-gl.js
Download https://cdn.esm.sh/v64/@types/[email protected]/index.d.ts
Download https://deno.land/[email protected]/node/process.ts
Download https://cdn.esm.sh/v64/@types/[email protected]/index.d.ts
Download https://deno.land/[email protected]/node/_errors.ts
Download https://deno.land/[email protected]/node/_options.ts |
sorry, my mistake! please use import 'https://esm.sh/protobufjs?target=es2021'; |
It loads es2021 now, but I've also lost intellisense, with |
@Xeevis just fixed it! |
According to the changelog build v64 updated the way
process
is handled. As a result the Deno version ofprotobufjs
includeshttps://deno.land/[email protected]/node/process.ts
which includes unstable APIs and cannot be used without adding the--unstable
flag to all Deno commands.Sample file:
Result:
If
--unstable
is provided then it will succeed, but attempting to generate a CommonJS bundle from the result fails for another reason:Pinning version v63 fixes both of the above errors:
Test to verify it's the inclusion of
process
:The text was updated successfully, but these errors were encountered: