Skip to content

SyntaxError: Cannot use import statement outside a module #8

Description

@MoatazAbdAlmageed
yarn run v1.21.0
$ webpack
Hash: 396f0bfb9d565b6f60f0
Version: webpack 1.15.0
Time: 571ms
    + 1 hidden modules

ERROR in ./js/app.js
Module build failed: /home/wuilt/rgrjs/data/schema.js:1
import {
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:1063:16)
    at Module._compile (internal/modules/cjs/loader.js:1111:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/home/wuilt/rgrjs/babelRelayPlugin.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at /home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/options/option-manager.js:178:20
    at Array.map (<anonymous>)
    at Function.normalisePlugins (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at OptionManager.init (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/home/wuilt/rgrjs/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/home/wuilt/rgrjs/node_modules/babel-loader/lib/index.js:46:20)
    at Object.module.exports (/home/wuilt/rgrjs/node_modules/babel-loader/lib/index.js:163:20)
Done in 0.97s.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions