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.

Example giving in documentation does not work on windows

See original GitHub issue

When following the first example in documentation you will end up with this error on windows

Error: Cannot determine how to prefix the keys in manifest.json. Call Encore.setManifestKeyPrefix() to choose what path (e.g. build/) to use when building your manifest keys. This is caused by setOutpu tPath() and setPublicPath() containing paths that don’t seem compatible.

This is reproduce able by creating an empty directory and following:

  1. execute $ yarn add @symfony/webpack-encore --dev
  2. create webpack.config.js file with contents found on http://symfony.com/doc/current/frontend/encore/simple-example.html
  3. creating assets/js/main.js & assets/css/global.scss
  4. execute ./node_modules/.bin/encore dev

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

11reactions
vdjagilevcommented, Jun 16, 2017

Temporary fix for Windows environment:

Encore
// directory where all compiled assets will be stored
    .setOutputPath('web/build')

    // Windows??? <---------------------------
    .setManifestKeyPrefix('/build')

    // what's the public path to this directory (relative to your project's document root dir)
    .setPublicPath('/build')

    // empty the outputPath dir before each build
    .cleanupOutputBeforeBuild()
    // ...

At least this one is worked for me. @DaRamirezSoto Can you confirm, that this workaround is ok?

4reactions
vdjagilevcommented, Jun 19, 2017

@Alestaan Hi,

I am executing this command:

node_modules\.bin\encore dev
Read more comments on GitHub >

github_iconTop Results From Across the Web

WHY can't MS get their documentation to reflect the actual steps
Select the Start button, then select Settings > Update & security > Windows Update > Advanced options > View your update history.
Read more >
Error opening Help in Windows-based programs: "Feature not ...
Resolves issues in which you cannot open Help files (.hlp) that were created in Windows Help format in Windows 7 or Windows Vista....
Read more >
How to troubleshoot problems that occur when you start or use ...
Start Word. Delete the Word Options registry key. Exit all Office programs. Type regedit in the Search box (in Windows ...
Read more >
Error codes in Device Manager in Windows - Microsoft Support
Lists the error codes that may be reported by Device Manager and the possible resolutions in Windows.
Read more >
Troubleshooting why Word won't print - Office | Microsoft Learn
Step 1: Test printing in other documents; Step 2: Test printing in other programs ... For example, some printing problems affect only Word, ......
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