Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Unexpected token = on first try in WSL. Need help. #33

Open
samusz opened this issue Aug 26, 2022 · 0 comments
Open

Unexpected token = on first try in WSL. Need help. #33

samusz opened this issue Aug 26, 2022 · 0 comments

Comments

@samusz
Copy link

samusz commented Aug 26, 2022

Hello,
New to your project which is really close to one of my needs for a hobby project of mine.

When trying to install the project, I get this error I don't know what to do with after launch with npm run serve

This is on a WSL ubuntu - thus the weird paths - and that may be the root cause of the error.
my shell is fish

Thanks in advance for any help/hint !

webpack-dev-server

🧐  Checking for wasm-pack...

ℹ️  Installing wasm-pack

[webpack-cli] /home/samusz/git-repos/prog/rust/wasm-pdf/node_modules/webpack-dev-server/lib/servers/WebsocketServer.js:10
  static heartbeatInterval = 1000;
                           ^

SyntaxError: Unexpected token =
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Server.getServerTransport (/home/samusz/git-repos/prog/rust/wasm-pdf/node_modules/webpack-dev-server/lib/Server.js:1663:28)
    at Server.createWebSocketServer (/home/samusz/git-repos/prog/rust/wasm-pdf/node_modules/webpack-dev-server/lib/Server.js:2443:57)
    at Server.start (/home/samusz/git-repos/prog/rust/wasm-pdf/node_modules/webpack-dev-server/lib/Server.js:3229:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! wasm-pdf@1.0.0 serve: `webpack-dev-server`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the wasm-pdf@1.0.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/samusz/.npm/_logs/2022-08-26T14_50_18_361Z-debug.log
samusz@samusz-asus-win10:~/git-repos/prog/rust/wasm-pdf$

the debug log doesn't help much

info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'serve' ]
2 info using npm@6.14.4
3 info using node@v10.19.0
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle wasm-pdf@1.0.0~preserve: wasm-pdf@1.0.0
6 info lifecycle wasm-pdf@1.0.0~serve: wasm-pdf@1.0.0
7 verbose lifecycle wasm-pdf@1.0.0~serve: unsafe-perm in lifecycle true
8 verbose lifecycle wasm-pdf@1.0.0~serve: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/samusz/git-repos/prog/rust/wasm-pdf/node_modules/.bin:/home
/samusz/.pyenv/libexec/pyenv:/home/samusz/.pyenv/libexec:/home/samusz/.pyenv/shims:/home/samusz/.pyenv/bin:/home/samusz/.bin:samusz/.local/bin:/usr/local/bin:/home/samu
sz/.cargo/bin:/home/samusz/.local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Python310/Scripts/:/mnt/c/Python310/:/mnt/c/Progr
am Files/Alacritty/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/Program Files/PuTTY/:/mnt
/c/WINDOWS/System32/OpenSSH/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/tools/BCURRAN3:/mnt/c/Program Files/Git LFS:/mnt/c/Program Files/Calibre2/:/mnt/c/Program Files (x
86)/GnuPG/bin:/mnt/c/Program Files/PowerShell/7-preview/preview:/mnt/c/Program Files/nu/bin/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program F
iles/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Program Files/ASUS/Bluetooth Software/:/mnt/c/Program Files/ASUS/Bluetooth Software/syswow64:/mnt/c/Program Files/Airshipp
er/:/mnt/c/Program Files (x86)/Yarn/bin/:/mnt/c/Program Files (x86)/oh-my-posh/bin:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files/GitHub CLI/:/mnt/c/Program Files/Gi
t/cmd:/mnt/c/Users/n/.cargo/bin:/mnt/c/Users/n/AppData/Local/Programs/Python/Python36-32/Scripts/:/mnt/c/Users/n/AppData/Local/Programs/Python/Python36-32/:/mnt/c/Users
/n/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files (x86)/FAHClient:/mnt/c/ProgramData/Samusz/GitHubDesktop/bin:/mnt/c/Users/n/AppData/Local/Microsoft/WindowsAp
ps:/mnt/c/Users/n/AppData/Local/Yarn/bin:/mnt/c/Users/n/AppData/Roaming/npm:/mnt/c/Users/n/AppData/Local/Programs/Hyper/resources/bin:/mnt/c/Program Files (x86)/GitHub
CLI/:/mnt/c/Users/n/AppData/Local/GitHubDesktop/bin:/mnt/c/Users/n/AppData/Local/Programs/oh-my-posh/bin:/mnt/c/Users/n/AppData/Local/Programs/oh-my-posh/themes:/mnt/c/
Users/n/AppData/Local/JetBrains/Toolbox/scripts:/home/samusz/.cargo/bin/
9 verbose lifecycle wasm-pdf@1.0.0~serve: CWD: /home/samusz/git-repos/prog/rust/wasm-pdf
10 silly lifecycle wasm-pdf@1.0.0~serve: Args: [ '-c', 'webpack-dev-server' ]
11 silly lifecycle wasm-pdf@1.0.0~serve: Returned: code: 2  signal: null
12 info lifecycle wasm-pdf@1.0.0~serve: Failed to exec serve script
13 verbose stack Error: wasm-pdf@1.0.0 serve: `webpack-dev-server`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid wasm-pdf@1.0.0
15 verbose cwd /home/samusz/git-repos/prog/rust/wasm-pdf
16 verbose Linux 4.4.0-19041-Microsoft
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "serve"
18 verbose node v10.19.0
19 verbose npm  v6.14.4
20 error code ELIFECYCLE
21 error errno 2
22 error wasm-pdf@1.0.0 serve: `webpack-dev-server`
22 error Exit status 2
23 error Failed at the wasm-pdf@1.0.0 serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant