I m just trying the deno, sorry but I can't understand why I get this error.
export class Vector {
x: number;
y: number;
z: number;
constructor(x: number, y: number, z: number) {
this.x = x;
this.y = y;
this.z = z;
return this;
}
}
///reference path="deno.d.ts"
import * as deno from "deno"
import { Vector } from './lib';
const v1 = new Vector(0, 0, 0);
console.log('v1:', v1);
and when I run deno app.ts I get this error
PS C:\dev\tests\testing deno.js\test-2\src> deno app.ts
Compiling C:/dev/tests/testing deno.js/test-2/src/app.ts
PermissionDenied: 螖蔚谓 蔚蟺喂蟿蟻苇蟺蔚蟿伪喂 畏 蟺蟻蠈蟽尾伪蟽畏. (os error 5)
at DenoError (deno/js/errors.ts:19:5)
at maybeError (deno/js/errors.ts:38:12)
at maybeThrowError (deno/js/errors.ts:26:15)
at sendSync (deno/js/dispatch.ts:67:5)
at codeFetch (deno/js/os.ts:39:19)
at _resolveModule (deno/js/compiler.ts:235:38)
at moduleNames.map.name (deno/js/compiler.ts:515:31)
at resolveModuleNames (deno/js/compiler.ts:507:24)
at compilerHost.resolveModuleNames (deno/third_party/node_modules/typescript/lib/typescript.js:32750:71)
at resolveModuleNamesWorker (deno/third_party/node_modules/typescript/lib/typescript.js:20688:69)
What should I do? end can someone explain how to use my local modules, thanks.
It looks like you have an import for ./lib but no accompanying file. Did you intend to import ./vector.ts?
@eventualbuddha Omg Thank you I make a mistake on the import statement.
Thank you very much for guiding me.
Posting here as I experienced the same error on Windows 10 when trying to read/write within the Windows directory. The problem in my case was a lack of admin privileges in the terminal I was using to call my Deno program.
Make sure your invoking shell is run as administrator (including your IDE/text editor in the case of integrated terminals).
I have this error -
error: Uncaught PermissionDenied: network access to "0.0.0.0:9090"
I tried with --allow-net flag but then too same error.
@Jay-EM17 Run it as deno run --allow-net index.ts not deno run index.ts --allow-net
@Jay-EM17 Run it as
deno run --allow-net index.tsnotdeno run index.ts --allow-net
solved my problem
It solved my problem. Thanks @frozenex @huangwei4478
Most helpful comment
Posting here as I experienced the same error on Windows 10 when trying to read/write within the Windows directory. The problem in my case was a lack of admin privileges in the terminal I was using to call my Deno program.
Make sure your invoking shell is run as administrator (including your IDE/text editor in the case of integrated terminals).