failed to load external module
rupesh2017 opened this issue ยท 8 comments
I don't what i did but now
victor-hugo@1.0.0 start /home/greenseek/Desktop/hugo-restaurant-tutorial
gulp server
[20:59:02] Failed to load external module
[20:59:02] Requiring external module babel-register
assert.js:42
throw new errors.AssertionError({
^
AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (/home/greenseek/Desktop/hugo-restaurant-tutorial/node_modules/undertaker/lib/set-task.js:10:3)
at Gulp.task (/home/greenseek/Desktop/hugo-restaurant-tutorial/node_modules/undertaker/lib/task.js:13:8)
at Object. (/home/greenseek/Desktop/hugo-restaurant-tutorial/gulpfile.babel.js:22:6)
at Module._compile (module.js:652:30)
at loader (/home/greenseek/Desktop/hugo-restaurant-tutorial/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/home/greenseek/Desktop/hugo-restaurant-tutorial/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at execute (/home/greenseek/Desktop/hugo-restaurant-tutorial/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js:36:18)
at Liftoff.handleArguments (/home/greenseek/Desktop/hugo-restaurant-tutorial/node_modules/gulp/node_modules/gulp-cli/index.js:175:63)
at Liftoff.execute (/home/greenseek/Desktop/hugo-restaurant-tutorial/node_modules/liftoff/index.js:203:12)
at module.exports (/home/greenseek/Desktop/hugo-restaurant-tutorial/node_modules/flagged-respawn/index.js:51:3)
at Liftoff. (/home/greenseek/Desktop/hugo-restaurant-tutorial/node_modules/liftoff/index.js:195:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! victor-hugo@1.0.0 start: gulp server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the victor-hugo@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
@rupesh2017 if you provide steps to reproduce, so a developer can get this error to happen on their own machine, someone can help from there.
I was installing nodejs 9 i checked nodejs and npm version then i was unable to use npm start , it was giving error
Failed to load external module
[20:59:02] Requiring external module babel-register
so i checking soultion i tried installing babel 6 and 7 version same error,
then tried cache clean npm command and gulp remove and reinstall
then finally this.
I got a Failed to load external module @babel/register
, too...
node v10.0.0
npm v5.6.0
Hugo v0.40.2
Steps to recreate:
- Clone repo
- Run
npm install
npm install
> fsevents@1.1.3 install /[PATH]/victor-hugo/node_modules/fsevents
> node install
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.3 and node@10.0.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
../../nan/nan.h:839:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/[PATH]/.node-gyp/10.0.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/[PATH]/.node-gyp/10.0.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:854:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/[PATH]/.node-gyp/10.0.0/include/node/node.h:164:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/[PATH]/.node-gyp/10.0.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:869:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/[PATH]/.node-gyp/10.0.0/include/node/node.h:157:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/[PATH]/.node-gyp/10.0.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1478:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/[PATH]/.node-gyp/10.0.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/[PATH]/.node-gyp/10.0.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
4 warnings generated.
SOLINK_MODULE(target) Release/fse.node
COPY /[PATH]/victor-hugo/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node
TOUCH Release/obj.target/action_after_build.stamp
> uws@0.14.5 install /[PATH]/victor-hugo/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0
> hugo-bin@0.23.0 postinstall /[PATH]/victor-hugo/node_modules/hugo-bin
> del-cli vendor && node lib/install
โ Hugo binary is installed successfully
added 2646 packages in 65.32s
- Run
gulp server
gulp server
[06:21:33] Failed to load external module @babel/register
[06:21:33] Requiring external module babel-register
gulp server[85723]: ../src/node_contextify.cc:631:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
1: node::Abort() [/usr/local/bin/node]
2: node::Assert(char const* const (*) [4]) [/usr/local/bin/node]
3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node]
5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
7: 0x1f3b588427d
[1] 85723 abort gulp server
I tried another Victor Hugo template to see if I would have trouble running that setup, and sure enough, I did.
Similar errors to what I had listed above.
yarn
yarn install v1.6.0
(node:5654) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[1/4] ๐ Resolving packages...
[2/4] ๐ Fetching packages...
warning Pattern ["esprima-fb@~3001.0001.0000-dev-harmony-fb"] is trying to unpack in the same destination "/Users/erasch/Library/Caches/Yarn/v1/npm-esprima-fb-3001.1.0-dev-harmony-fb-b77d37abcd38ea0b77426bb8bc2922ce6b426411" as pattern ["esprima-fb@~3001.1.0-dev-harmony-fb"]. This could result in non-deterministic behavior, skipping.
[3/4] ๐ Linking dependencies...
warning " > babel-loader@6.4.1" has unmet peer dependency "babel-core@^6.0.0".
warning " > babel-loader@6.4.1" has incorrect peer dependency "webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc".
warning "netlify-cms > react-scroll-sync@0.4.0" has incorrect peer dependency "react-dom@0.14.x || 15.x".
warning "netlify-cms > slate-edit-list@0.10.1" has incorrect peer dependency "slate@^0.29.0".
warning "netlify-cms > slate-edit-table@0.12.0" has incorrect peer dependency "slate@^0.27.2".
warning "netlify-cms > slate-plain-serializer@0.4.13" has incorrect peer dependency "slate@^0.31.5".
warning "netlify-cms > slate-react > slate-base64-serializer@0.2.15" has incorrect peer dependency "slate@^0.31.5".
warning "netlify-cms > slate-react > slate-prop-types@0.4.13" has incorrect peer dependency "slate@^0.31.5".
warning " > postcss-cssnext@2.11.0" has unmet peer dependency "caniuse-db@^1.0.30000652".
[4/4] ๐ Building fresh packages...
โจ Done in 38.63s.
yarn start
yarn run v1.6.0
(node:6109) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
$ gulp server
[07:46:10] Requiring external module babel-register
gulp[6110]: ../src/node_contextify.cc:631:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
1: node::Abort() [/usr/local/bin/node]
2: node::Assert(char const* const (*) [4]) [/usr/local/bin/node]
3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node]
5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
7: 0x1f865a18427d
error Command failed with signal "SIGABRT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Don't use your own version of gulp, use npm start
instead for Victor Hugo's gulp dependency. Please close if that works.
I'm getting the same error with npm start.
Toms-iMac:victor-hugo Tom$ npm start
victor-hugo@1.0.0 start /Volumes/3TBInternal/WebDesign/victor-hugo/victor-hugo
gulp server
[23:59:43] Requiring external module babel-register
gulp[7535]: ../src/node_contextify.cc:631:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfov8::Value &): Assertion `args[1]->IsString()' failed.
1: node::Abort() [/usr/local/bin/node]
2: node::InternalCallbackScope::~InternalCallbackScope() [/usr/local/bin/node]
3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfov8::Value const&) [/usr/local/bin/node]
4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node]
5: v8::internal::MaybeHandlev8::internal::Object v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate*, v8::internal::Handlev8::internal::HeapObject, v8::internal::Handlev8::internal::HeapObject, v8::internal::Handlev8::internal::FunctionTemplateInfo, v8::internal::Handlev8::internal::Object, v8::internal::BuiltinArguments) [/usr/local/bin/node]
6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
7: 0x20e02e98427d
8: 0x20e02e98f755
9: 0x20e02ea0bc20
10: 0x20e02e9944f7
11: 0x20e02e9944f7
12: 0x20e02e9944f7
Node: 10.0.0
npm: 5.6.0
I'm just starting this journey so I could be missing something simple but figured I'd weigh in here.
It's this: gulpjs/gulp#2162
Updated dependencies, should be fixed now. Can someone confirm and close?
I have the same problem, how did you solved this problem? Thanks.