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

change path to webpack script #9

Merged
merged 2 commits into from
Nov 11, 2020
Merged

change path to webpack script #9

merged 2 commits into from
Nov 11, 2020

Conversation

s-oram
Copy link
Contributor

@s-oram s-oram commented Nov 11, 2020

I'm attempting to build the playground
project on Windows but have run into an error.

Running npm run build in the Playground project results in:

D:\dev-ie\auspost-kiosk\playground\node_modules\.bin\webpack:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^
SyntaxError: missing ) after argument list

The build fails after this error. It appears to be a
common error on Windows.

gotwarlost/istanbul#677
jestjs/jest#4751

There might be a few potential solutions.

This blog post suggested changing how Webpack is called.
https://www.programmersought.com/article/49215661254/

Quote:

The first type of packaging command is ./node_modules/.bin/webpack,
you can see that all the shell commands in the .bin directory are .cmd;

The second type of packaging command is ./node_modules/webpack/bin/webpack,
the last webpack is actually a js file, of course it supports node,
which also reflects the flexibility and omnipotence of the js language.

I'm attempting to build the [playground](https://github.com/foyerlive/playground) 
project on Windows but have run into an error. 

Running `npm run build` in the Playground project results in: 
```
D:\dev-ie\auspost-kiosk\playground\node_modules\.bin\webpack:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^
SyntaxError: missing ) after argument list
```

The build fails after this error. It appears to be a 
common error on Windows. 

gotwarlost/istanbul#677
jestjs/jest#4751

There might be a few potential solutions. 

This blog post suggested changing how Webpack is called. 
https://www.programmersought.com/article/49215661254/

Quote:
> The first type of packaging command is ./node_modules/.bin/webpack, 
> you can see that all the shell commands in the .bin directory are .cmd;
> 
> The second type of packaging command is ./node_modules/webpack/bin/webpack, 
> the last webpack is actually a js file, of course it supports node, 
> which also reflects the flexibility and omnipotence of the js language.
@s-oram s-oram requested a review from jturle November 11, 2020 21:08
@jturle jturle merged commit 001cb9a into master Nov 11, 2020
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

Successfully merging this pull request may close these issues.

2 participants