Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Install kit #862

Closed
mvannux opened this issue Sep 21, 2022 · 6 comments
Closed

[BUG] Install kit #862

mvannux opened this issue Sep 21, 2022 · 6 comments

Comments

@mvannux
Copy link

mvannux commented Sep 21, 2022

Describe the bug
Following the readme.md file to install and start the web app the web app doesn't start and an error occurs in the console:

Starting the development server...

D:\Progetti\react-designer-italia\testapp\node_modules\react-scripts\scripts\start.js:19
  throw err;
  ^

TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must be absolute
    at new NodeError (node:internal/errors:393:5)
    at getPathFromURLWin32 (node:internal/url:1459:11)
    at fileURLToPath (node:internal/url:1489:22)
    at Input.origin (D:\Progetti\react-designer-italia\testapp\node_modules\postcss\lib\input.js:202:23)
    at Input.error (D:\Progetti\react-designer-italia\testapp\node_modules\postcss\lib\input.js:133:23)
    at Declaration.error (D:\Progetti\react-designer-italia\testapp\node_modules\postcss\lib\node.js:60:32)
    at Warning.toString (D:\Progetti\react-designer-italia\testapp\node_modules\postcss\lib\warning.js:21:24)
    at new Error (<anonymous>)
    at new Warning (D:\Progetti\react-designer-italia\testapp\node_modules\postcss-loader\dist\Warning.js:15:5)
    at Object.loader (D:\Progetti\react-designer-italia\testapp\node_modules\postcss-loader\dist\index.js:149:22) {
  code: 'ERR_INVALID_FILE_URL_PATH'
}

Node.js v18.9.0
error Command failed with exit code 1.

To Reproduce
Steps to reproduce the behavior:

npx create-react-app testapp
cd testapp
yarn add design-react-kit --save
yarn add bootstrap-italia typeface-lora typeface-roboto-mono typeface-titillium-web --save
yarn start

Expected behavior
A web page with the component

Other Required Information (please complete the following information):

  • OS: windows 10
  • Browser chrome
  • Version 4.0.2

Additional context
From the package.json:
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"bootstrap-italia": "^2.0.4",
"design-react-kit": "^4.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"typeface-lora": "^1.1.13",
"typeface-roboto-mono": "^1.1.13",
"typeface-titillium-web": "^1.1.13",
"web-vitals": "^2.1.4"
},

@mvannux mvannux added the bug label Sep 21, 2022
@andry900
Copy link

andry900 commented Oct 4, 2022

I have the same issue, I haven't been able to find a solution yet.

@dej611
Copy link
Member

dej611 commented Oct 7, 2022

Thanks for reporting @mavannux . Will try to have a look at that 👍

@ai
Copy link

ai commented Oct 12, 2022

Seems like fixed in PostCSS 8.4.18
postcss/postcss#1788

@mvannux
Copy link
Author

mvannux commented Oct 18, 2022

Hi, it seems partially resolved,
the previous code works, but not the components:

import React from 'react';
import './App.css';
import { Alert } from 'design-react-kit';
import 'bootstrap-italia/dist/css/bootstrap-italia.min.css';
import 'typeface-titillium-web';
import 'typeface-roboto-mono';
import 'typeface-lora';

const App = () => {
    return (
        <Alert>This is an Alert</Alert>
    );
};

export default App;

this code stops the dev server with the error:

TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must be absolute
    at new NodeError (node:internal/errors:393:5)
    at getPathFromURLWin32 (node:internal/url:1459:11)
    at fileURLToPath (node:internal/url:1489:22)
    at Input.origin (D:\Users\xxx\documents\_Esempi\express\testapp\node_modules\postcss\lib\input.js:202:23)
    at Input.error (D:\Users\xxx\documents\_Esempi\express\testapp\node_modules\postcss\lib\input.js:133:23)
    at Declaration.error (D:\Users\xxx\documents\_Esempi\express\testapp\node_modules\postcss\lib\node.js:60:32)
    at Warning.toString (D:\Users\xxx\documents\_Esempi\express\testapp\node_modules\postcss\lib\warning.js:21:24)
    at new Error (<anonymous>)
    at new Warning (D:\Users\xxx\documents\_Esempi\express\testapp\node_modules\postcss-loader\dist\Warning.js:15:5)
    at Object.loader (D:\Users\xxx\documents\_Esempi\express\testapp\node_modules\postcss-loader\dist\index.js:149:22) {
  code: 'ERR_INVALID_FILE_URL_PATH'
}

@manu2794
Copy link

Hi, i have the same problem:

TypeError: File URL path must be absolute at new NodeError (node:internal/errors:371:5) at getPathFromURLWin32 (node:internal/url:1390:11) at fileURLToPath (node:internal/url:1420:22) at Input.origin (C:\Users\test\node_modules\postcss\lib\input.js:202:23) at Input.error (C:\Users\test\node_modules\postcss\lib\input.js:133:23)

I've postcss with version 8.4.20

Copy link

stale bot commented Dec 11, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please read #886.

@stale stale bot added the wontfix label Dec 11, 2023
@stale stale bot closed this as completed Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants