Skip to content

import config --> unexpected identifier #10

Open
@franciscouhlenbrok

Description

@franciscouhlenbrok

import config from './config';
^^^^^^

SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:723:23)
at loader (/home/francisco/Documents/Programming Courses/learn-fullstack-javascript/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/home/francisco/Documents/Programming Courses/learn-fullstack-javascript/node_modules/babel-register/lib/node.js:154:7)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at Object. (/home/francisco/Documents/Programming Courses/learn-fullstack-javascript/node_modules/babel-cli/lib/_babel-node.js:154:22)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

That's the error message I get. I've cloned the current version with Tag 2.3-end from your GitHub. Can you help me?

Activity

foad-heidari

foad-heidari commented on Jan 14, 2021

@foad-heidari

i don't know what repository do you mean. upload the files so i can help you.
the error here is bcz of the import config from './config';

franciscouhlenbrok

franciscouhlenbrok commented on Jan 14, 2021

@franciscouhlenbrok
Author

learn-fullstack-javascript.zip

That's my repository

foad-heidari

foad-heidari commented on Jan 14, 2021

@foad-heidari

i'm not gonna download that.
you can send the file here one by one

is this the repo which does have the error ? https://github.com/jscomplete/learn-fullstack-javascript/blob/final-code/server.js

franciscouhlenbrok

franciscouhlenbrok commented on Jan 14, 2021

@franciscouhlenbrok
Author

Screenshot from 2021-01-14 20-39-38

Yes it's that repo, but the version your find under the tag "2.3-end"

foad-heidari

foad-heidari commented on Jan 14, 2021

@foad-heidari

this is not my repo any way
why you thing this is my repo?

i cant help you if you dont give enough information about your error and the files which related to your error

franciscouhlenbrok

franciscouhlenbrok commented on Jan 14, 2021

@franciscouhlenbrok
Author

Of course it's not your repo, as I opened this issue on @samerbuna's repo.
How do you assume that I'd think that's your repo?

SzDaniel95

SzDaniel95 commented on Jan 15, 2021

@SzDaniel95

Maybe you use old version of NodeJS

talanaji

talanaji commented on May 1, 2021

@talanaji

you can write it like this
import config from './config.js';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @talanaji@foad-heidari@SzDaniel95@franciscouhlenbrok

        Issue actions

          import config --> unexpected identifier · Issue #10 · jscomplete/learn-fullstack-javascript