-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received '' #424
Comments
@andreperegrina can you share your |
Sure, here is my package.json
|
@andreperegrina it looks like you're using CRA 5 with craco 6. CRA 5 requires craco 7. I hope to have a stable release available soon but until then you can try using the latest alpha ( |
Did you manage to resolve this problem? I am experiencing the same issue with a different plugin and I am using craco@7.0.0-alpha.8. |
@allens01 which plugin? Could you share your dependency list and the error you're getting? |
Sure, the error I am getting is: ERROR in [eslint] Failed to load plugin 'decorators-legacy' declared in 'BaseConfig': The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received '' My dependency list:
Craco.config.js snippit
|
I'm seeing this same (or similar) issue running craco@7 and react-scripts@5 with eslint when running through cypress. Error:
Relevant config: // relevant craco config
module.exports = {
plugins: [
{
plugin: CracoAlias,
options: {
baseUrl: './src',
},
},
{
plugin: new NodePolyfillPlugin(),
},
],
jest: {
configure: addAliases('jest'),
},
devServer: {
allowedHosts: 'all',
headers: {
'Access-Control-Allow-Origin': '*',
},
},
eslint: {
configure: () => eslintConfig,
},
}; // eslint config
module.exports = {
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:cypress/recommended',
'plugin:import/recommended',
'prettier',
],
plugins: ['react', 'cypress'],
rules: {
// ...omitted for brevity
},
globals: {
window: true,
document: true,
fetch: true,
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
alias: {
map: [['@', './src']],
},
},
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
env: {
browser: true,
node: true,
es6: true,
},
overrides: [
{
files: '**/*.test.js',
env: {
jest: true,
},
},
{
extends: ['plugin:@typescript-eslint/recommended', 'prettier'],
files: ['./*.d.ts', './**/*.ts'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
rules: {},
},
],
}; |
I just ran into the same issue with The issue seems to revolve around the use of
When I updated my Updated
Old/Erroring
|
I'm just upgrading from craco
5.6.4
to the latest release, and I'm getting this error when trying to build the app.This is my eslint configruation
Does anyone know how to solved?
The text was updated successfully, but these errors were encountered: