Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: Cannot use import statement outside a module #8

Open
MoatazAbdAlmageed opened this issue Apr 7, 2020 · 0 comments
Open

Comments

@MoatazAbdAlmageed
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant