Finefoods example: A lot of error at first start
I just get finefoods example and try to start on my Mac. It started successfully but hundred warnings/errors occur in terminal as below.
Please help me to resolve!
.......
`WARNING in ./node_modules/@antv/l7plot-component/dist/esm/legend/continue/theme.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/finefoods-antd/node_modules/@antv/l7plot-component/src/legend/continue/theme.ts' file: Error: ENOENT: no such file or directory, open '/finefoods-antd/node_modules/@antv/l7plot-component/src/legend/continue/theme.ts'
WARNING in ./node_modules/@antv/l7plot-component/dist/esm/legend/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/finefoods-antd/node_modules/@antv/l7plot-component/src/legend/index.ts' file: Error: ENOENT: no such file or directory, open '/finefoods-antd/node_modules/@antv/l7plot-component/src/legend/index.ts'
WARNING in ./node_modules/@antv/l7plot-component/dist/esm/tooltip/constants.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/finefoods-antd/node_modules/@antv/l7plot-component/src/tooltip/constants.ts' file: Error: ENOENT: no such file or directory, open '/finefoods-antd/node_modules/@antv/l7plot-component/src/tooltip/constants.ts'
WARNING in ./node_modules/@antv/l7plot-component/dist/esm/types/legend.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/finefoods-antd/node_modules/@antv/l7plot-component/src/types/legend.ts' file: Error: ENOENT: no such file or directory, open '/finefoods-antd/node_m
........
13 Replies
Hi, I am refine support bot :wave:. I am here to help you with your question. I searched for the answer to your question in the refine documentation and found an answer! 🏆
Answer: To resolve the errors, you can try removing the
Answer: To resolve the errors, you can try removing the
node_modules
folder, removing the package-lock.json
file, and running npm install
, or running npm install react@latest react-dom@latest
.
SOURCES:
Solution 1: ./docs/api-reference/antd/migration-guide/v4-to-v5.md
Solution 2: ./docs/api-reference/antd/migration-guide/v4-to-v5.md
Note: If this is the answer you need, then we are very lucky. If not, please wait for someone from the refine core team or the community to try to help you.
foreign-sapphire•2y ago
Hey @Tri Le,
Tomorrow, we'll investigate it and as soon as possible we'll inform you 🙏
optimistic-gold•2y ago
@salihozdemir Thanks a lot. 👍
optimistic-gold•2y ago
Another error when trying to create new prj.
![No description](https://cdn.answeroverflow.com/1074368759235616849/image.png)
optimistic-gold•2y ago
Why all refine packages are undefined?
![No description](https://cdn.answeroverflow.com/1074378209124171826/image.png)
foreign-sapphire•2y ago
Hey @Tri Le,
1- I start the finefoods example and saw the same warnings as you. The warnings occur because a external package we use in the example is not compatible with the react-scripts@5. You can ignore the warnings for now.
foreign-sapphire•2y ago
2- I reproduced the your selections and successfully created a new project. I think the problem is that you are using the version of yarn? Can you try to use npm instead?
![No description](https://cdn.answeroverflow.com/1074618540574916669/image.png)
foreign-sapphire•2y ago
3- There can be such situations caused by npm, can you try again?
optimistic-gold•2y ago
@salihozdemir Thank you for taking the time
I used npm and successfully created new NextJs project. Unfortunately, the site cannot start with command
npm run dev
I'm using Node 18.10.0.
/my-antd-project/node_modules/antd/es/table/hooks/useLazyKVMap.js:1 import * as React from 'react'; ^^^^^^ SyntaxError: Cannot use import statement outside a module at Object.compileFunction (node:vm:360:18) at wrapSafe (node:internal/modules/cjs/loader:1078:15) at Module._compile (node:internal/modules/cjs/loader:1113:27) at Module._extensions..js (node:internal/modules/cjs/loader:1203:10) at Module.load (node:internal/modules/cjs/loader:1027:32) at Module._load (node:internal/modules/cjs/loader:868:12) at Module.require (node:internal/modules/cjs/loader:1051:19) at require (node:internal/modules/cjs/helpers:103:18) at Object.<anonymous> (/Users/trile/Projects/personal-apps/my-antd-project/node_modules/@ant-design/pro-utils/lib/useEditableArray/index.js:26:45)......
foreign-sapphire•2y ago
Sorry for this issue, as far as I remember, it was a situation caused by the version of @pankod/refine-antd. It is a known issue and it had to be fixed. I’ll be inform you in first work hours.
Hey @Tri Le,
Could you try again? The issue's PR had merged so it should be work 🙏
optimistic-gold•2y ago
Just retry with with-nextjs. The same error occurs
![No description](https://cdn.answeroverflow.com/1075013008855679067/image.png)
foreign-sapphire•2y ago
Hey @Tri Le,
We fixed it on superplate, the change over the examples are forgotten. Sorry for this. I've created a PR https://github.com/refinedev/refine/pull/3611.
You can quickly create the
next.config.js
file and paste on the PR changes. If you don't want to wait PR to merge.optimistic-gold•2y ago
I've retried with
npm create refine-app@latest
command. It works perfect.
Thank you @salihozdemir