Comments (13)
Is the deno.json
at the root of your repo? Do you have a repo I can take a look at?
from deno.
Yes, deno.json is at the root, and deno.json file works properly as it should. All the imports does the job properly, it's just VS Code that fails.
You can take a look at the repo but it's private. Can I give you private access?
from deno.
Sure, can you invite @nayeemrmn and @nathanwhit?
from deno.
If you're using deno.enablePaths
ensure it contains the deno.json
.
from deno.
Also, try running deno upgrade
.
from deno.
Invited both Nathanwhit and Nayeermrmn.
Also tried deno upgrade, it didn't change anything for me.
from deno.
@saeho I don't see anything wrong with it, it should work. What does the output panel say when you start the language server? Open it by clicking on the Deno part of the status bar at the bottom right.
from deno.
@saeho I don't see anything wrong with it, it should work. What does the output panel say when you start the language server? Open it by clicking on the Deno part of the status bar at the bottom right.
It says:
Refreshing configuration tree...
Resolved Deno configuration file: "file:///Users/saeho/Documents/apps/app-server/deno.json"
Resolved lockfile: "file:///Users/saeho/Documents/apps/app-server/deno.lock"
Resolved import map from configuration file
Resolved Deno configuration file: "file:///Users/saeho/Documents/apps/app-web/deno.json"
Resolved import map from configuration file
Server ready.
Error caching: Relative import path "preact/jsx-runtime" not prefixed with / or ./ or ../ and not in import map from "data:application/typescript;base64,aW1wb3J0ICdwcmVhY3QvanN4LXJ1bnRpbWUnOw=="
at data:application/typescript;base64,aW1wb3J0ICdwcmVhY3QvanN4LXJ1bnRpbWUnOw==:1:8
```
from deno.
@saeho The project folder you're using there is above the one you gave us access to. What's the path of your project root? Are you using a multiroot workspace? Currently we don't have full support for monorepos with multiple deno.json
s
If your project root is file:///Users/saeho/Documents/apps/
, I suggest having a file:///Users/saeho/Documents/apps/deno.json
which has all the mappings from both projects.
from deno.
Path of the project is "file:///Users/saeho/Documents/apps/app-web/" and "file:///Users/saeho/Documents/apps/app-web/deno.json" is the correct path. And there is only 1 deno.json file.
I changed the path name and changed it to "app-web" instead of "name"
from deno.
@saeho The project folder you're using there is above the one you gave us access to. What's the path of your project root? Are you using a multiroot workspace? Currently we don't have full support for monorepos with multiple
deno.json
sIf your project root is
file:///Users/saeho/Documents/apps/
, I suggest having afile:///Users/saeho/Documents/apps/deno.json
which has all the mappings from both projects.
Can you clarify what multiroot workspace is?
I'm using VS Code and i have 2 repos on the side so i can switch between 2 repos without changing VS Code tabs.
But the 2 repos are separate and not connected in any way.
from deno.
I'm using VS Code and i have 2 repos on the side so i can switch between 2 repos without changing VS Code tabs.
Okay, yeah that's the issue. This is a multi-root workspace and they share a language server. Only the deno.json
from your topmost project will be used for both currently. You can temporarily merge your other import map into that one.
from deno.
Okay, that explains it all then.
Thank you.
A future update for this feature would be greatly appreciated.
from deno.
Related Issues (20)
- Node:http localAddress not supported in compat
- parser-ts fails to work in deno HOT 1
- npm @gutenye/ocr-node doesn't work correctly
- Will the `curl -fsSL https://deno.land/install.sh | sh` URL install Deno 2.0 (i.e. breaking changes) once 2.0 is released? HOT 2
- [node] deasync package doesn't work in Deno CLI HOT 1
- workspaces: Always walk up to the root of the file system unless you encounter a deno.json(c) file with "workspace" key
- workspaces: Do not allow to use two different workspaces in subcommands that accept multiple entrypoints
- workspaces: Lockfile should be placed next to the workspace config file
- workspaces: Specify behavior of `deno install` when in a workspace context
- workspaces: Specify behavior of `package.json` in context of Deno workspace HOT 1
- Doc tests don't play nice with blockquotes in markdown
- `mkdir()` incorrectly returns `undefined` and produces unexpected subsequent results
- Deprecate / Remove `--lock-write` HOT 1
- Way to resolve npm file imports like npm:lib/bin.wasm HOT 2
- `import.meta.resolve` does not resolve `npm:` specifiers that have not been loaded already but are in a package that is already loaded HOT 1
- `Deno.open` successfully opens folders on linux HOT 1
- devcontainer with denoland/deno:alpine not working HOT 2
- Expose `zstd` compress to js code HOT 1
- Broken debugger HOT 5
- Bad Content-Length when use octokit upload asset with webStream
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deno.