deno icon indicating copy to clipboard operation
deno copied to clipboard

Relative import path not prefixed

Open arthurwolf opened this issue 7 months ago • 10 comments

Version: latest

After a full day banging my head against walls trying to get ESM to work and failing, somebody recommended I try deno.

I just tried, and it does this:

run --check backend/index.ts
error: Relative import path "unrar" not prefixed with / or ./ or ../
    at file:///home/arthur/dev/ai/manga/ui/backend/index.ts:17:34

which is weird that it would fail like this, thinking unrar is a relative import when it seemingly had no problem with the 10 other modules before that:

import express from 'express';
import multer from 'multer';
import cors from 'cors';
import fs from 'fs';
import {fileTypeFromBuffer} from 'file-type';
import {readChunk} from 'read-chunk';
import path from 'path';
import {glob} from 'glob';
// Database.
import sequelize from '../../src/db/database';
import Book from '../../src/db/book';
import Page from '../../src/db/page';

// Zip and rar stuff.
import unzipper from 'unzipper';
import tar from 'tar';
import { Extract as Unrar } from 'unrar';

console.log("z");

what's going on here?

thanks

arthurwolf avatar Dec 03 '23 03:12 arthurwolf