Kedi
Kedi1h ago

[Bug]: Deno expects text or bytes files lines to be in Quotation marks

I've two files that I wanted to import, trying to import them either as text or bytes results in Deno trying to parse them as javascript unless the lines were inside double quotations
import wgServerPublicKey from "@wg-server-publickey" with { type: "bytes", encoding: "utf-8" }; // same error if type: text
import wgServerConfig from "@wg-server-config" with { type: "bytes" }; // same error if type: text
import wgServerPublicKey from "@wg-server-publickey" with { type: "bytes", encoding: "utf-8" }; // same error if type: text
import wgServerConfig from "@wg-server-config" with { type: "bytes" }; // same error if type: text
error: The module's source code could not be parsed: Expected ';', '}' or <eof> at file:///~/infrastructure/secrets/wg-server-public.key:1:44

YjrFYyZJ+coooM5XDLOMIWf2qgDjY6Ku9MncFUg91ng=

error: The module's source code could not be parsed: Expression expected at file:///~/infrastructure/assets/wireguard-server.nix:1:17

{ config, pkgs, ... }:
~~~
error: The module's source code could not be parsed: Expected ';', '}' or <eof> at file:///~/infrastructure/secrets/wg-server-public.key:1:44

YjrFYyZJ+coooM5XDLOMIWf2qgDjY6Ku9MncFUg91ng=

error: The module's source code could not be parsed: Expression expected at file:///~/infrastructure/assets/wireguard-server.nix:1:17

{ config, pkgs, ... }:
~~~
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?