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

Using backpack as a global module on Windows #101

Open
Granipouss opened this issue Jan 10, 2018 · 1 comment
Open

Using backpack as a global module on Windows #101

Granipouss opened this issue Jan 10, 2018 · 1 comment

Comments

@Granipouss
Copy link

Hi,

I have installed backpack-core globally (npm i -g) on my Windows and tested it on the basic example) It was not working because of the first line of the main.js:

require('C:\Users\Brendan\AppData\Roaming\npm\node_modules\backpack-core\node_modules\source-map-support\register.js')

Node as issues requiring modules with absolute path on windows. Replacing this first line the following fixes the problem.

require('C:/Users/Brendan/AppData/Roaming/npm/node_modules/backpack-core/node_modules/source-map-support/register.js')

A dirty fix would be to replace the separators here.

new webpack.BannerPlugin({
  raw: true,
  entryOnly: false,
  banner: `require('${
    // Is source-map-support installed as project dependency, or linked?
    ( require.resolve('source-map-support').indexOf(process.cwd()) === 0 )
      // If it's resolvable from the project root, it's a project dependency.
      ? 'source-map-support/register'
      // It's not under the project, it's linked via lerna.
      : require.resolve('source-map-support/register').replace(/\\/g, '/')
  }')`
}),

cheers,

@viztor
Copy link

viztor commented Aug 13, 2018

same problem

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

2 participants