Kubessandra / react-google-calendar-api

An api to manage your google calendar
MIT License
215 stars 88 forks source link

Build parse error #61

Closed ryokochang closed 3 years ago

ryokochang commented 3 years ago

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

Kubessandra commented 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?

ryokochang commented 3 years ago

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

Kubessandra commented 3 years ago

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?

ryokochang commented 3 years ago

eslint of the package

this error occurs when i build my project

Kubessandra commented 3 years ago

There is no eslint in the package. You need to ignore the node_modules in your eslint config.

ryokochang commented 3 years ago

my project still dont building

i think is the babel config

ryokochang commented 3 years ago

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.
Kubessandra commented 3 years ago

How do you import the package?