jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.44k stars 4.02k forks source link

Warning when compiling with React #16116

Closed mraible closed 2 years ago

mraible commented 3 years ago
Overview of the issue

When creating a monolith with React, there's a compile warning on the main branch.

WARNING in ./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from
'/Users/mraible/dev/example/node_modules/@reduxjs/toolkit/dist/module.js.map' 
file: Error: ENOENT: no such file or directory, open
'/Users/mraible/dev/example/node_modules/@reduxjs/toolkit/dist/module.js.map'
Motivation for or Use Case

Since it pops an alert, it's not a great experience. Everything still compiles though.

Reproduce the error

Create an app with React.

JHipster Version(s)
gallery@0.0.1-SNAPSHOT /Users/mraible/dev/example
└── generator-jhipster@7.1.0 -> ./../generator-jhipster
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "baseName": "gallery",
    "jhipsterVersion": "7.1.0",
    "skipClient": false,
    "skipServer": false,
    "skipUserManagement": true,
    "skipCheckLengthOfIdentifier": false,
    "skipFakeData": false,
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "testFrameworks": ["cypress"],
    "blueprints": [],
    "otherModules": [],
    "pages": [],
    "creationTimestamp": 1630470306439,
    "serviceDiscoveryType": "no",
    "reactive": false,
    "authenticationType": "oauth2",
    "packageName": "org.jhipster.gallery",
    "serverPort": "8080",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "postgresql",
    "buildTool": "maven",
    "serverSideOptions": [],
    "websocket": false,
    "searchEngine": false,
    "messageBroker": false,
    "enableSwaggerCodegen": false,
    "clientFramework": "react",
    "withAdminUi": true,
    "clientTheme": "none",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "devServerPort": 9060,
    "clientPackageManager": "npm",
    "clientThemeVariant": "",
    "languages": ["en", "pt-br"],
    "entities": ["Album", "Photo", "Tag"],
    "lastLiquibaseTimestamp": 1630470748000
  }
}

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
entity Album {
  title String required
  description TextBlob
  created Instant
}
entity Photo {
  title String required
  description TextBlob
  image ImageBlob required
  height Integer
  width Integer
  taken Instant
  uploaded Instant
}
entity Tag {
  name String required minlength(2)
}
relationship ManyToOne {
  Album{user(login)} to User
  Photo{album(title)} to Album
}
relationship ManyToMany {
  Photo{tag(name)} to Tag{photo}
}

paginate Album with pagination
paginate Photo, Tag with infinite-scroll

Environment and Tools

openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

git version 2.32.0

node: v14.17.0

npm: 7.21.0

Docker version 20.10.8, build 3967b7d

mraible commented 3 years ago

Related: there's no JHipster logo displayed when I run this app.

Screen Shot 2021-08-31 at 10 38 39 PM
qmonmert commented 3 years ago

same error here https://github.com/jhipster/generator-jhipster/pull/16079

qmonmert commented 3 years ago

@deepu105 you worked on reduxjs?

deepu105 commented 3 years ago

I guess the warning was present then as well. Could be either a redux issue or our webpack config issue

mshima commented 3 years ago

Fix merged upstream to master branch https://github.com/reduxjs/redux-toolkit/pull/1459

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted. We are accepting PRs :smiley:. Comment or this will be closed in 7 days

qmonmert commented 2 years ago

Fix with this new release https://github.com/reduxjs/redux-toolkit/releases/tag/v1.6.2

alishahwee commented 2 years ago

This is still occurring in 1.6.2. I am using TypeScript however:

Failed to parse source map from '/Users/Z006DJ6/src/projects/janus/shelfedgecameraui/node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.ts' file: Error: ENOENT: no such file or directory, open '/Users/Z006DJ6/src/projects/janus/shelfedgecameraui/node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.ts'
qmonmert commented 2 years ago

@pascalgrimaud there's not a compile warning on the main branch, we can close this ticket

Gayatri19670 commented 2 years ago

WARNING in ./node_modules/@auth0/auth0-react/dist/auth0-react.esm.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):