Skip to content
New issue

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

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

Already on GitHub? # to your account

ReferenceError: regeneratorRuntime is not defined #23

Open
vettloffah opened this issue Jun 6, 2020 · 0 comments
Open

ReferenceError: regeneratorRuntime is not defined #23

vettloffah opened this issue Jun 6, 2020 · 0 comments

Comments

@vettloffah
Copy link

vettloffah commented Jun 6, 2020

After installing sails-hook-babel, I cannot launch sails app. I receive error ReferenceError: regeneratorRuntime is not defined on each sails helper function.

I created a config/babel.js file with polyfill: true and teh app launches, but then it gives me a new error of cannot read success of undefined when trying to return a value in exits.success in an actions2 action.

Using:
Sails 1.0
Node 10

Error after installing sails-hook-babel and trying to launch sails app:

--
error: Attempted to require('/Users/charlesw/Code/goodnature-api-sails/api/helpers/get-matching-contacts.js'), but an error occurred:
ReferenceError: regeneratorRuntime is not defined
at /Users/charlesw/Code/goodnature-api-sails/api/helpers/get-matching-contacts.js:29:5
at Object. (/Users/charlesw/Code/goodnature-api-sails/api/helpers/get-matching-contacts.js:29:5)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Module._compile (/Users/charlesw/Code/goodnature-api-sails/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Object.newLoader [as .js] (/Users/charlesw/Code/goodnature-api-sails/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at /Users/charlesw/Code/goodnature-api-sails/node_modules/include-all/lib/help-include-all-sync.js:293:33
at Array.forEach ()
at _recursivelyIncludeAll (/Users/charlesw/Code/goodnature-api-sails/node_modules/include-all/lib/help-include-all-sync.js:178:11)
at includeAll (/Users/charlesw/Code/goodnature-api-sails/node_modules/include-all/lib/help-include-all-sync.js:317:5)
at helpBuildDictionary (/Users/charlesw/Code/goodnature-api-sails/node_modules/include-all/lib/help-build-dictionary.js:46:13)
at Function.module.exports.optional (/Users/charlesw/Code/goodnature-api-sails/node_modules/include-all/index.js:67:10)
at loadHelpers (/Users/charlesw/Code/goodnature-api-sails/node_modules/sails/lib/hooks/helpers/private/load-helpers.js:24:14)
at Hook.initialize (/Users/charlesw/Code/goodnature-api-sails/node_modules/sails/lib/hooks/helpers/index.js:285:7)
at Hook.wrapper [as initialize] (/Users/charlesw/Code/goodnature-api-sails/node_modules/@sailshq/lodash/lib/index.js:3282:19)
at /Users/charlesw/Code/goodnature-api-sails/node_modules/sails/lib/hooks/index.js:122:20
at /Users/charlesw/Code/goodnature-api-sails/node_modules/async/dist/async.js:421:16

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant