Closed ryokochang closed 3 years ago
you can remove the build/Apicalendar.js and just run a yarn build normally. It will regenerate the Apicalendar.js do you have the same issue?
i already tried remove build folder and all node modules and install, but without success
when i install the packages, it comes with build folder
Oh sorry, I thought you were developing on the package not using it. Is this our eslint or the eslint of the package throwing the error?
eslint of the package
this error occurs when i build my project
There is no eslint in the package. You need to ignore the node_modules in your eslint config.
my project still dont building
i think is the babel config
i simply cant build the project...
I don't know how to solve this.
my package.json:
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"eject": "react-scripts eject",
"precommit": "lint-staged"
}
my console output:
14:16 $ yarn run build
yarn run v1.22.5
$ react-app-rewired build
Creating an optimized production build...
Failed to compile.
./node_modules/react-google-calendar-api/build/ApiCalendar.js
Module parse failed: Unexpected token (199:16)
You may need an appropriate loader to handle this file type.
| return this.gapi.client.calendar.events.list({
| 'calendarId': calendarId,
| ...queryOptions
| });
| } else {
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
How do you import the package?
Eslint error on build/Apicalendar.js
Module parse failed: Unexpected token (199:16)
You may need an appropriate loader to handle this file type.
return this.gapi.client.calendar.events.list({
'calendarId': calendarId,
...queryOptions
});
} else {
you solved this issue on src files