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

ERROR in ./assets/js/core.js Module build failed: TypeError: Path must be a string. Received undefined #268

Open
larpo1 opened this issue Sep 26, 2016 · 7 comments

Comments

@larpo1
Copy link

larpo1 commented Sep 26, 2016

Hi - can you shed any light on the following which I get when running gulp?

ERROR in ./assets/js/core.js
Module build failed: TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1326:5)
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:36
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:396:22
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:385:20)
    at OptionManager.mergePresets (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:369:10)
    at OptionManager.mergeOptions (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328:14)
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:370:14
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:390:24
 @ multi core

ERROR in ./assets/js/main.js
Module build failed: TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1326:5)
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:36
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:396:22
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:385:20)
    at OptionManager.mergePresets (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:369:10)
    at OptionManager.mergeOptions (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328:14)
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:370:14
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:390:24
 @ multi main
@Ballpin
Copy link

Ballpin commented Oct 11, 2016

getting same error

@Ballpin
Copy link

Ballpin commented Oct 14, 2016

Had old npm version. Fixed when i installed node v4.6

@Maximilianos
Copy link
Member

@Ballpin nice! :) @larpo1 was the node version the issue for you as well?

@BradlySharpe
Copy link

Same error running initial gulp build after cloning
node: v7.0.0
npm: 3.10.9
gulp: 3.9.1

@BradlySharpe
Copy link

Fixed by upgrading babel-core to version 6.10.4 as referenced here

@axelson
Copy link

axelson commented Mar 26, 2017

For future people here is what I ran to upgrade babel-core and related packages

ncu -u babel-core babel-eslint babel-loader babel-plugin-transform-runtime babel-preset-es2015 babel-preset-stage-2
npm upgrade babel-core babel-eslint babel-loader babel-plugin-transform-runtime babel-preset-es2015 babel-preset-stage-2

Where ncu is https://www.npmjs.com/package/npm-check-updates

Can the upgrade to babel-core be added to the project itself?

@ThomasGHenry
Copy link

Upgrading babel seems like a fairly unwieldy option at this point (reconciling deps and plugins, webpack, etc). Downgrading node to 5.11.1 is way easier if a bit slow and.. old.

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

6 participants