Error occurs when using npx method to set up the required software environment on Win10 22H2 Build: 19045.3086
pbb-xx opened this issue ยท 3 comments
The error is shown here:
C:\Users\pbb>npx fe-fwk-cli init fwk-name
Need to install the following packages:
fe-fwk-cli@1.0.5
Ok to proceed? (y) y
C:\Users\pbb\AppData\Local\npm-cache_npx\6a3102d9f09715c2\node_modules\fe-fwk-cli\dist\index.js:1
(function (exports, require, module, __filename, __dirname) { (()=>{var t={879
............................................................................................................................^
SyntaxError: Unexpected token )
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\Users\pbb\AppData\Local\npm-cache_npx\6a3102d9f09715c2\node_modules\fe-fwk-cli\bin\cli.js:3:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
Have you any idea what is going wrong?
This command is working for me (MacOS Monterrey, 12.6.7, Intel chip):
~ npx fe-fwk-cli init whatever
Need to install the following packages:
fe-fwk-cli@1.0.5
Ok to proceed? (y) y
๐ Initializing the project whatever...
โ
Success! Created the new project whatever ๐๐๐
You can now cd into the project and install the dependencies:
$ cd whatever
$ npm install
๐ Enjoy reading the book!
๐ฆ Buy your copy at http://mng.bz/aM2o and start learning now!
Could you specify your OS version?
It is Win10 Pro 22H2 Build: 19045
I had initially tried the manual way, but I couldn't make that work either.
I don't see you're doing anything wrong; for what I see it should be working for you (provided you have an up-to-date version of Node correctly installed).
Can you re-install Node to its latest version and try again?