question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bin/encore dev-server: Path must be a string

See original GitHub issue

Hi, I’m trying to use webpack-encore in my Symfony3 project with this doc but when I execute: ./node_modules/.bin/encore dev-server

I’m getting this error:

path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:1211:7)
    at find (/Users/xxx/Sites/tp/node_modules/babel-loader/lib/resolve-rc.js:11:21)
    at module.exports (/Users/xxx/Sites/tp/node_modules/@symfony/webpack-encore/lib/config/parse-runtime.js:64:47)
    at Object.<anonymous> (/Users/xxx/Sites/xxx/tp-trepia/node_modules/@symfony/webpack-encore/bin/encore.js:18:23)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

My config: macOS Sierra 10.12.5 node -v -> v6.11.0 npm -v -> 3.10.10

Looking on google, some people advise to downgrade to node v5 but the same error appears.

Thanx

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
weaverryancommented, Jun 20, 2017

Thanks @stof I’m working on a PR right now!

2reactions
LMSzorcommented, Jul 3, 2017

I had the same problem, and setup posted @bogdaniel really helped. Somehow placing babel-loader before @symfony/webpack-encore, and updating @symfony/webpack-encore to 0.8 from 0.7.2 fixed things up for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack ERROR in Path must be a string. Received undefined
I got the the error "ERROR in The "path" argument must be of type string. Received type undefined webpack: Failed to compile. enter...
Read more >
Using webpack-dev-server and HMR (Symfony 4.1 Docs)
If you're using dev-server from inside a virtual machine, then you'll need to bind to all IP addresses and allow any host to...
Read more >
webpack-dev-server and Hot Module Replacement (HMR ...
This builds and serves the front-end assets from a new server. This server runs at localhost:8080 by default, meaning your build assets are ......
Read more >
DevServer - webpack
Depending on your configuration, the URL may look like http://localhost:9000/webpack-dev-server/invalidate . tip. HTML template is required to serve the bundle, ...
Read more >
Hello Webpack Encore - SymfonyCasts
But first, I want you to know why you should care about Webpack... like super ... But, it will revolutionize the way you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found