Closed rballonline closed 3 years ago
Hey, can you share your npm version using the command npm --version
? I believe the command you posted should work correctly with npm v6 and v7 which have shipped with Node.js for a while now. If you're using npm v6 or v7 but it's still not working, this will help us reproduce the issue. Thanks!
6.14.13
Updated to the latest version 7.21.0.
Getting the same error. I can clone the examples directory fine, not sure what the difference is.
Interesting! I am not able to reproduce the issue, and the output of my test is below. Can you share some more details about your system— what version of operating system, shell, and version of node are you using?
$ npm -v
6.14.13
$ npm init @hapipal paldo-riddles
npx: installed 59 in 9.983s
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help init` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
package name: (paldo-riddles)
version: (1.0.0)
description:
git repository:
keywords:
author:
license: (ISC)
About to write to /my/current/directory/paldo-riddles/package.json:
{
"main": "lib/index.js",
"scripts": {
"start": "node server",
"test": "lab -a @hapi/code -L",
"lint": "eslint ."
},
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapipal/haute-couture": "4.x.x",
"joi": "17.x.x"
},
"devDependencies": {
"@hapi/code": "8.x.x",
"@hapi/eslint-config-hapi": "13.x.x",
"@hapi/eslint-plugin-hapi": "4.x.x",
"@hapi/glue": "8.x.x",
"@hapi/hapi": "20.x.x",
"@hapi/lab": "24.x.x",
"@hapipal/confidence": "6.x.x",
"@hapipal/hpal": "3.x.x",
"@hapipal/hpal-debug": "2.x.x",
"@hapipal/toys": "3.x.x",
"babel-eslint": "10.x.x",
"dotenv": "8.x.x",
"eslint": "7.x.x",
"exiting": "6.x.x"
},
"name": "paldo-riddles",
"version": "1.0.0",
"directories": {
"lib": "lib",
"test": "test"
},
"author": "",
"license": "ISC",
"description": ""
}
Is this OK? (yes)
New pal project created in paldo-riddles
If you'd like to continue with the getting started tutorial without using npm init
, you can also use:
npx @hapipal/create paldo-riddles
Or more manually,
git clone --depth=1 --origin=pal --branch=pal git@github.com:hapipal/boilerplate.git paldo-riddles
cd paldo-riddles
git checkout --orphan main # New branch without history
git fetch pal --tags
OS Name: Microsoft Windows 10 Pro OS Version: 10.0.19043 N/A Build 19043
If you'd like to continue with the getting started tutorial without using
npm init
, you can also use:npx @hapipal/create paldo-riddles
Tried that got this
npm WARN deprecated @hapi/joi@16.1.8: Switch to 'npm install joi'
events.js:352
throw er; // Unhandled 'error' event
^
Error: spawn C:\<my folder>\AppData\Local\npm-cache\_npx\<nums>\node_modules\hpal\bin\hpal ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn C:\\<myfolder>\\AppData\\Local\\npm-cache\\_npx\\<random stuff>\\node_modules\\hpal\\bin\\hpal',
path: 'C:\\<myfolder>\\AppData\\Local\\npm-cache\\_npx\\<random stuff>\\node_modules\\hpal\\bin\\hpal',
spawnargs: [ 'new', 'paldo-riddles' ]
}
git clone --depth=1 --origin=pal --branch=pal git@github.com:hapipal/boilerplate.git paldo-riddles cd paldo-riddles git checkout --orphan main # New branch without history git fetch pal --tags
Got a security error with this one. I'm guessing at this point I'll just use the cloned version instead. Just trying to give it a whirl and follow through with the walk throughs.
Installed WSL w/ Ubuntu just to give it a go. Works fine. Zero clue what's wrong with my Win installation. :(
There is in fact nothing at https://registry.npmjs.org/create-paldo-riddles so I wonder what the two are looking at differently.
Thanks for checking it out. It's too bad you ran into so many snags on Windows, as we definitely want our tooling to work well for as many people as possible. It's a little bit tricky for me to work on and debug, as I don't have access to a Windows machine, but I will keep this in mind and perhaps generate some followup issues. It's also a possible that it's a combination of npm and hpal issues combined.
I made it through the install part but npm start also gave me an error. Again blocked :( Don't want to hurt feelings but I'm probably going to go try someplace else. I was just thinking this was a quick way to tryout node and getting a user account system setup. Just FYI
/home/rball/paldo-riddles/node_modules/@hapi/teamwork/lib/index.js:8
#meetings = null;
^
SyntaxError: Invalid or unexpected token
That's alright! This issue looks like it's caused by using a version of node that the latest version of hapi does not support, since it's choking on use of private class fields. If you are interesting in forging ahead, just ensure you're using node v12+.
P.S. I've had great luck using nvm for managing my node installation and switching between multiple node versions. I would also recommend moving to node v12 at some point soon if that was indeed the issue, as node v10 and below are not maintained anymore. Node v12 will be maintained through April 2022—there's some great info on this here.
node -v
v14.17.1
VSCode is also giving me redlines when inspecting the file. I'm more of a TypeScript guy so didn't know about private props for JS. Pretty cool. Wonder why mine doesn't support it.
Much appreciate the advice and trying to help. Wish I had better news.
Started the getting started guide. Ran
npm init @hapipal paldo-riddles
at the terminal
got