You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow importing of ESM modules within the require-all module import happens.
Actual behavior
When importing an ESM module using babel, if that module has another ESM module inside it, we get this error (which ultimately comes from require-all):
import { arrayToObject } from '../utils/arrayUtils';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1055:16)
at Module._compile (internal/modules/cjs/loader.js:1103:27)
at Module._compile (/Users/austin/Dev/RupieNetwork/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
at Object.newLoader [as .js] (/Users/austin/Dev/RupieNetwork/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:988:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1028:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/austin/Dev/RupieNetwork/src/admin/models/gig.js:1:1)
at Module._compile (internal/modules/cjs/loader.js:1139:30)
at Module._compile (/Users/austin/Dev/RupieNetwork/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
at Object.newLoader [as .js] (/Users/austin/Dev/RupieNetwork/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:988:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1028:19)
at require (internal/modules/cjs/helpers.js:72:18)
at /Users/austin/Dev/RupieNetwork/node_modules/require-all/index.js:56:46
at Array.forEach (<anonymous>)
at requireAll (/Users/austin/Dev/RupieNetwork/node_modules/require-all/index.js:34:9)
at requireAllModels (/Users/austin/Dev/RupieNetwork/node_modules/forest-express/dist/index.js:95:7)
at buildSchema (/Users/austin/Dev/RupieNetwork/node_modules/forest-express/dist/index.js:130:10)
at Object.exports.init (/Users/austin/Dev/RupieNetwork/node_modules/forest-express/dist/index.js:232:3)
at Object.init (/Users/austin/Dev/RupieNetwork/node_modules/forest-express-sequelize/dist/index.js:219:20)
at new module.exports (/Users/austin/Dev/RupieNetwork/src/admin/middlewares/forestadmin.js:11:17)
at resolve (/Users/austin/Dev/RupieNetwork/src/admin/app.js:62:24)
at /Users/austin/Dev/RupieNetwork/node_modules/require-all/index.js:56:38
at Array.forEach (<anonymous>)
at requireAll (/Users/austin/Dev/RupieNetwork/node_modules/require-all/index.js:34:9)
at /Users/austin/Dev/RupieNetwork/src/admin/app.js:59:3
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Users/austin/Dev/RupieNetwork/src/admin/app.js:14:103)
at _next (/Users/austin/Dev/RupieNetwork/src/admin/app.js:16:194)
Failure Logs
See above
Context
Importing ESM modules that contain nested ESM modules from within sequelize-express.
Package Version: ^5.6.0
Express Version: ~4.17.1
The text was updated successfully, but these errors were encountered:
Expected behavior
Allow importing of ESM modules within the
require-all
module import happens.Actual behavior
When importing an ESM module using babel, if that module has another ESM module inside it, we get this error (which ultimately comes from
require-all
):Failure Logs
See above
Context
Importing ESM modules that contain nested ESM modules from within
sequelize-express
.The text was updated successfully, but these errors were encountered: