Questions tagged [absolute-path]

global address for a file, independent from the working directory of the calling process

Filter by
Sorted by
Tagged with
3 votes
0 answers
53 views

Get ERR_UNSUPPORTED_ESM_URL_SCHEME or ENOENT or ERR_INVALID_URL_SCHEME when use absolute path on Windows node js

When I run my code on Linux it works fine. But on Windows with the same node js version(18.18.0) I get errors. I use modern ES imports and my package.json has string "type": "module&...
upcast's user avatar
  • 97
2 votes
1 answer
83 views

How to get rid of relative import in Typescript + Node 18?

I'm currently running a backend application in Typescript 5.2, which can be build to run as a Debian service on production with node 18 or directly run in a Docker container through nodemon. ...
Paul-Marie's user avatar
1 vote
0 answers
61 views

Absolute imports: React + TypeScript + Vite

Issue I have an react app built by yarn create vite I wanted to use absolute imports instead of "../../.." in my files, but it doesn't work in my React + Vite app. And everything works fine ...
Vladislav Gumbatov's user avatar
0 votes
1 answer
40 views

Unable to archive mutiple files in a single tar using ansible

I wish to compress the comma separated files in variable {{ sourcefiles }} into HELLO.tar on the target source_host and bring it to Ansible controller using fetch module and unarchive (while retaining ...
Ashar's user avatar
  • 3,027
0 votes
0 answers
14 views

VSCode imports using @ by default [duplicate]

I am writing an application using TS and I am using path aliases, defined in my tsconfig.json, which is configured like this: "paths": { "@/*": ["src/*"], "@...
Bernardo Benini Fantin's user avatar
0 votes
0 answers
20 views

Error on Import Paths on react typescript project in aws EC2 production

i get this errors while i try to generate a build on AWS Module not found: Error: Can't resolve 'src/index.css' in '/home/ec2-user/node-website/src' ERROR in ./src/index.tsx 6:0-23 Module not found: ...
ELKRYMY's user avatar
0 votes
1 answer
176 views

Why don't absolute paths works in TurboRepo

I've set up a new project on the latest version of TurboRepo. In the 'apps' directory, I've created a new Vite project using the 'react-swc-ts' template. I've modified the 'tsconfig.json' of the Vite ...
Michal's user avatar
  • 789
2 votes
1 answer
308 views

Absolute paths in react native version 0.72 typescript

Hey Guys so I'm struggling to set absolute paths in react native I used babel-plugin-module-resolver for that and also set tsconfig.json and 'babel.config.js' as slowed below and VS code isn't giving ...
Ankit Patel's user avatar
1 vote
2 answers
152 views

How to properly use absolute path with typescript and nodejs?

I know, many people has this question, I already tried all those options and still having issues, so let's see my case: I want to import my functions like this: import { generateOTP, sendOTP } from '...
Israel Santiago's user avatar
0 votes
0 answers
17 views

Relative path not working in specific file but works with absolute path - PHP [duplicate]

I'm a newbie in PHP. My project is stored in the folder called 'Remember'. I want to include database.php into the home.php Remember/app/database/database.php Remember/app/logged/home.php In the ...
Andrew530's user avatar
1 vote
0 answers
42 views

How do you reference an absolute URL in Next.js <Head>?

I am trying to use next/head to dynamically set an og:image, which requires an absolute URL. <meta property="og:image" content="https://example.com/og.jpg" /> How can I get ...
Michael Lynch's user avatar
0 votes
1 answer
104 views

How to unzip an archive with absolute paths?

I have a ZIP file that was obtained from https://highlightjs.org/download - for some inexplicable reason it has absolute pathnames in it: $ unzip -l highlight.zip Archive: highlight.zip Length ...
user9645's user avatar
  • 6,436
2 votes
1 answer
55 views

Type a command that will print the absolute path to the `ls` program on your system [closed]

I am looking for a very simple command to print the absolute path of ls. I have tried a lot of different methods and can't seem to find the correct answer. The code is meant to be along the line of cd;...
Elina's user avatar
  • 37
1 vote
1 answer
32 views

PHP unlink function use absolute or relative path?

this one really puzzles me, if i use the code below in file delete_pic.php, it give me the Warning: unlink(/upload_pic/image.jpg): No such file or directory in /Sites/delete_pic.php <?php $...
Evan W.'s user avatar
  • 21
0 votes
0 answers
91 views

Unable to use any Root path in Intellij only Absolute path

I am having trouble with IntelliJ recognizing file paths when the file is located outside of the src folder. This problem only occurs when the file path is not an absolute path, and it is causing me ...
sedib's user avatar
  • 1
0 votes
1 answer
80 views

How to add a variable in absolute file path using fs.writeFile( )

let fd = xeleCatalog.descendantFirst('order'); let file = fd.toXmlString(); let filename = data['Testorders.ID'].toString().concat(".xml"); let path = 'E:\\IGEM\\orders\\'filename; fs....
Mohammad Zarak's user avatar
-1 votes
1 answer
20 views

cant to connect absolute import in ts

enter image description here in the photo is the whole essence of the problem, tell me what will help to solve it? probably something in the assembly causes a conflict because of which the path does ...
Eduard's user avatar
  • 1
0 votes
1 answer
89 views

Why by calling new File(".").getAbsolutePath() I get completely different path from my project's location?

My project is located here: D:/WorkSpace/PuzzleApp but when I am calling new File(".").getAbsolutePath(); I get: D:\!Documents\Desktop\. Why? And how to fix this? I'm using Eclipse.
pure21_h's user avatar
-1 votes
2 answers
71 views

How Java isAbsolute() depends on path separator and/or OS?

I'm trying to correct some code written in Java. Back and forward slashes behave differently in isAbsolute() function. Path ESPath = Paths.get("\\es-module-repo\\fdea3319-18ea-4bd5-8ae2-...
Plamen's user avatar
  • 316
0 votes
1 answer
898 views

What is the correct syntax for absolute paths in Vite for ReactJS components and pages?

I need help with absolute path in Vite(React) relative src. I want to use next path for example: 'components/Main/Main' or if this is a pages folder same thing 'pages/Home/Home' I tried to many ...
Богдан Гапоненко's user avatar
0 votes
0 answers
52 views

Absolute imports corrupt declaration files (.d.ts) in npm package

I have an npm package of react components . I am using Typescript + webpack + babel. I am using Absolute paths for imports in my components. "baseUrl": "./", "paths&...
Arsany Benyamine's user avatar
2 votes
0 answers
60 views

VS Code setting absolute paths for modern browser js imports incorrectly

Working on native browser app using pure javascript, that is native to the chrome engine, with raw js files being served to chrome from a subdirectory in my project. When using visual studio code I ...
Nick Muhonen's user avatar
1 vote
2 answers
382 views

In React and Typescript why are my absolute paths not working on nested folders?

I'm trying to set up absolute paths in my React project but am running into a few issues when it comes to nested folders and the use of @ prefix. With the following settings in my tsconfig.json: { &...
singlservinjack's user avatar
0 votes
0 answers
487 views

The file db/changelog/db.changelog-master.xml was not found in

When I run "clean compile liquibase:update" I get the error "The file db/changelog/db.changelog-master.xml was not found in" followed by a list of links where the search was made. ...
Alexey's user avatar
  • 1
0 votes
2 answers
39 views

How can I geta list of files in multiple sub-folder with their absolute path in Linux

I have multiple sub-folder, in every sub-folder have multiple .txt file. I want to organize a list with every file.I use this command to get absolute path. find $PWD -type f -name "*.txt" ...
mashimena's user avatar
  • 175
1 vote
1 answer
154 views

how to save the absolute path of a file as a string with angular

I have this line of code and it picks all the files in a folder. <input type="file" id="filepicker" name="fileList" (change)="saveFolderLocation($event)" ...
Georgi Yakov's user avatar
1 vote
0 answers
394 views

Choose folder location and save it as a string with angular

I'm new to angular and I'm currently struggling with a functionality I'm trying to implement. What I'm trying to do, is to pick a folder and save its absolute path as a string, similar to when you ...
Georgi Yakov's user avatar
0 votes
0 answers
101 views

Problem importing CSS file with absolute path

I'm having an issue and can't find a solution. In our create-react-app work project I have configured a jsconfig.json file that allows us for easy absolute imports. { "compilerOptions": { ...
Durbaja's user avatar
0 votes
0 answers
261 views

Error while attempt to connect to MySQL server from Delphi Windows application

I see that this has been a problem for many users, way back. I have read and tried most of the tips from these questions and answers without success. My connection works well on the development PC (&...
Sjubussen's user avatar
0 votes
0 answers
30 views

Enforce only absolute paths on a page rendered in rails

Is there a good way to enforce and/or detect (at runtime) that a specific page rendered by rails is only using absolute paths? For context, we'd like to setup a reverse proxy (not a redirect!) such ...
Tom Lord's user avatar
  • 27.6k
-4 votes
2 answers
299 views

VSCode on MacOS (Ventura) "open" folder finder dialogue does not show full path. Why not?

When I open a normal finder window on MacOS (Ventura), I have it set so that I can see the absolute path listed at the bottom of the window. This does NOT happen in VSCode. When clicking Open (or ...
Jeff Greenlee's user avatar
0 votes
3 answers
452 views

opening an external "file explorer" app: how to get absolute path from a uri pointing to a folder

In my app, the user can choose where the created files (text files) are created. This part is working fine. But now, I want to open an external "file explorer" app, pointing directly to the ...
Laurent D.'s user avatar
1 vote
0 answers
55 views

How to retrieve the absolute path represented by a `Dir` object in Ruby?

I want to write a method that takes a Dir-object as argument and does something with it, and for that I need to know the absolute path represented by this object. How do I retrieve this information? ...
XiaohuWang's user avatar
0 votes
0 answers
88 views

Clean CRA not resolving @/absolute/paths

I have a completely clean install of create-react-app but when I try to use absolute paths it won't resolve the paths. Everything seems correct since VSCode resolves the path successfully but the ...
Z3ROO's user avatar
  • 1
0 votes
1 answer
91 views

CMake Link Static .lib files

I have a library in: C:\vcpkg\installer\x86-windows-static\lib and I would like to link it via this absolute path. The cmake file resides elsewhere, it is for an executable program (not a library). Is ...
pman's user avatar
  • 33
1 vote
1 answer
426 views

In Angular 14 and module federation, what is the correct way to use import.meta.resolve?

I'm using Angular 14 and module federation. I want to use import.meta within my remote application to get the absolute path (e.g. starting with "http://") of a resource. In my remote ...
Dave's user avatar
  • 15.1k
0 votes
3 answers
70 views

How to correctly plug CSS into HTML with absolute path to make picture from CSS working?

It might sound silly, but I am trying to understand this. When I plugged CSS with absolute path - picture/fonts are not loading (404). I test a page on the built-in WebStorm server (2022.3) through ...
lalivirtei's user avatar
-1 votes
1 answer
82 views

Losing absolute paths after returning them from function

I have this function here that renames (if necessary) all files in a given folder and returns all filenames as absolute paths: I forgot to mention: filepath is always an absolute path. import re ...
Jakob Czapski's user avatar
2 votes
0 answers
450 views

Unable to resolve module in React Native Expo app

I'm using 'babel-plugin-root-import' and typescript to configure absolute path. When I'm trying to import files from root directory with import {Config} from "~/Config/Config" the "...
Jostar's user avatar
  • 51
7 votes
0 answers
544 views

Why don't absolute paths work when importing typescript files into other typescript files but are otherwise ok, in a React Native Project?

Backstory: I am gradually converting an existing React Native project to TypeScript. Absolute paths have been working for years based on my babelrc configuration. Problem: Since adding TypeScript, ...
gabriellend's user avatar
1 vote
0 answers
25 views

Does GNU make prepend a "./" to the path of included makefiles?

Running GNU Make 4.4 on Windows 10. I'm trying to include a generated makefile from another. When the included file is given as an absolute directory, I get the following error: makefile:6: ./D:/...
Tim-Schaeffer_Crown's user avatar
0 votes
0 answers
167 views

i want to getSavedUri() of saved video file

i have made a simple camera application using cameraX api to record 10 sec video. app is working fine it records 10 sec video and save it into internal mobile storage but i want to get absolute path ...
Hassaan Zahid's user avatar
2 votes
1 answer
423 views

Absolute import is not working with fastify-autoload

I'm building fastify application with typescript and I'm having problems with using absolute import. { "extends": "fastify-tsconfig", "compilerOptions": { "...
Meerkat's user avatar
  • 334
0 votes
2 answers
316 views

How can I retun a list of absolute paths?

The following code returns a list of file-names in a given directory: def get_files(dir_path_str): onlyfiles = next(os.walk(dir_path_str))[2] return onlyfiles How can I make it return ...
user366312's user avatar
  • 16.8k
1 vote
0 answers
190 views

Some named exports not working when setting absolute import paths with baseUrl (tsconfig)

In my tsconfig.json I added "baseUrl": "src" in order to use cleaner absolute imports. The project structure is roughly: |- src |- components |- someComponent ...
 HigoChumbo 's user avatar
0 votes
1 answer
73 views

Python class membership and absolute paths

I'm working on a project where the source code is nested in the following structure: |-- my-project |-- test_notebook.ipynb |-- package |-- src | |-- module1.py #defines ...
mr_faulty's user avatar
  • 133
1 vote
0 answers
124 views

Why are absolute imports not working in my react-native expo project?

An example of the imports follows: import { useAppDispatch, useAppSelector } from '~/redux/hooks' import * as walletActions from '~/redux/wallet/actions' import { actions, selectState as ...
maxspiri's user avatar
  • 368
0 votes
1 answer
551 views

Download files with absolute path outside of wwwroot with Razor Page

We are building a Razor Page WebApp that we need our users to be able to download files stored on our server. File path looks like this //server_name/Databases/PDF_Files/2022-01-01-Invoice.pdf All the ...
Xiao Chen's user avatar
1 vote
1 answer
838 views

Can't set up absolute module imports in monorepo

I'm trying to set up absolute imports in react/typescript project, but can't find a solution for my case. Always get same error: ERROR in ./src/app/App.tsx 18:14-37 Module not found: Error: Can't ...
inu255's user avatar
  • 21
0 votes
0 answers
40 views

How to run the particular file in absolute path?

I have Files called enum-pipeline-2.conf enum-ruby-filter-2.rb get_session_msgs_query.json lookup.json, which I was running by giving ./file_name in my linux script. I wanted to run those files ...
Lalit Kumar Singh's user avatar

1
2 3 4 5
17