roxiness / routify-starter

https://example.routify.dev/
198 stars 55 forks source link

throw new ERR_INVALID_ARG_TYPE(name, 'string', value); #107

Closed archoda closed 3 years ago

archoda commented 3 years ago

npm run dev

svelte-app@1.0.0 dev [project-path]-routify run-p routify nollup

svelte-app@1.0.0 nollup [project-path]-routify nollup -c

svelte-app@1.0.0 routify [project-path]-routify routify

internal/validators.js:125 throw new ERR_INVALID_ARG_TYPE(name, 'string', value); ^


Seems '../.routify/routes' doesnt exist...but, If I change 'import { routes } from "../.routify/routes";' to 'import { routes } from "@roxi/routify/tmp/routes";' in App.svelte then the error just errs out on nollup -c

ghostdevv commented 3 years ago

Not sure why this is, can you use npx stackmix instead? that is our new beta template system

archoda commented 3 years ago

Unfortunately, I cannot if it's still only in beta.

jakobrosenberg commented 3 years ago

Just to be clear, stackmix is beta, but the packages it uses aren't. If you're able to generate a working template that fits your needs, you should be good.

ghostdevv commented 3 years ago

What Jake said, the tool is still in beta but the templates aren't

ghostdevv commented 3 years ago

Is this still an issue? @archoda

tobbtechnologies commented 3 years ago

I face the same problem npm run dev fails

svelte-app@1.0.0 nollup nollup -c

path.js:39 throw new ERR_INVALID_ARG_TYPE('path', 'string', path); ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Re ceived type undefined at assertPath (path.js:39:11) at resolve (path.js:166:7) at _getParentModuleDir (C:\Users\Tobb\svelte\node_modules\configent\configen t.js:176:24) at C:\Users\Tobb\svelte\node_modules\configent\configent.js:161:46 at getDetectDefaults (C:\Users\Tobb\svelte\node_modules\configent\configent. js:114:65) at buildConfig (C:\Users\Tobb\svelte\node_modules\configent\configent.js:64: 41) at configent (C:\Users\Tobb\svelte\node_modules\configent\configent.js:56:12 ) at module.exports.input (C:\Users\Tobb\svelte\node_modules\@roxi\routify\lib \utils\config.js:7:40) at Object. (C:\Users\Tobb\svelte\node_modules\@roxi\routify\plugi ns\cli.js:5:48) at Module._compile (internal/modules/cjs/loader.js:689:30) ERROR: "routify" exited with 1.

ghostdevv commented 3 years ago

Can you try using stackmix

tobbtechnologies commented 3 years ago

Thank you for your reply

this

$ git clone https://github.com/roxiness/stackmix.git $ cd routify-templates $ npm install

from here https://www.npmjs.com/package/stackmix

is not working too

alesvaupotic commented 3 years ago

Use it like npx stackmix and then choose your prefered stack

image

tobbtechnologies commented 3 years ago

Thanks a lot for your help but it is not working

C:\Users\Tobb>cd demo

C:\Users\Tobb\demo>npx stackmix (node:2956) ExperimentalWarning: The fs.promises API is experimental C:\Users\Tobb\node_modules\canvasit\lib\blueprint\hookHelpers.js:31 fileWalker = callback => fileWalker(this.output, callback) ^

SyntaxError: Unexpected token = at new Script (vm.js:79:7) at createScript (vm.js:251:10) at Object.runInThisContext (vm.js:303:10) at Module._compile (internal/modules/cjs/loader.js:657:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18)

C:\Users\Tobb\demo>npm i stackmix (node:3852) ExperimentalWarning: The fs.promises API is experimental npm WARN EBADENGINE Unsupported engine { package: 'dashargs@4.1.3', npm WARN EBADENGINE required: { node: '>=12' }, npm WARN EBADENGINE current: { node: 'v10.15.1', npm: '7.8.0' } }

changed 10 packages, and audited 267 packages in 2m

12 packages are looking for funding run npm fund for details

found 0 vulnerabilities

C:\Users\Tobb\demo>npx stackmix (node:116) ExperimentalWarning: The fs.promises API is experimental C:\Users\Tobb\node_modules\canvasit\lib\blueprint\hookHelpers.js:31 fileWalker = callback => fileWalker(this.output, callback) ^

SyntaxError: Unexpected token = at new Script (vm.js:79:7) at createScript (vm.js:251:10) at Object.runInThisContext (vm.js:303:10) at Module._compile (internal/modules/cjs/loader.js:657:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18)

C:\Users\Tobb\demo>

alesvaupotic commented 3 years ago

What's your node version?

npm WARN EBADENGINE required: { node: '>=12' },
npm WARN EBADENGINE current: { node: 'v10.15.1', npm: '7.8.0' } }
tobbtechnologies commented 3 years ago

This one v10.15.1

Everything about svelte works except this nice router part, I cannot update node version it is giving problems. I am able to do all I want with this version except this routify.

I reada "Given the variety of fragments, we would greatly appreciate contributors for this projects pray", but there is no clear communication on how we should do it.

There is no contact us, no emails except to use this issues.

There is typo error here

$ git clone https://github.com/roxiness/stackmix.git $ cd routify-templates $ npm install

clone creates stackmix and cd routify-templates is moving to a non existent directory.

I fell in love with svelte and routify but if I can help where I can, I am willing to do so.

alesvaupotic commented 3 years ago

I am not sure how this will play out as Node 10 is out-of-life today exactly.

README is getting an update, thanks for reporting.

ghostdevv commented 3 years ago

@tobbtechnologies Install nvm on your relevant system and then you can do nvm install 14 --lts nvm use <version> where is the version you just installed (it will say something like 14.xx.xx)

You need node 12 and above

jakobrosenberg commented 3 years ago

There's also Volta if nvm isn't an option.

braebo commented 3 years ago

I've been getting this same issue when using stackmix with vite for dev and spank + rollup -c for build. Anytime rollup -c or rollup -cw is run, the error throws.

[!] TypeError: The "path" argument must be of type string. Received an instance of Object
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object
    at new NodeError (node:internal/errors:329:5)
    at validateString (node:internal/validators:129:11)
    at resolve (node:path:1019:7)
    at Object.<anonymous> (/Users/fractal/dev/Commissions/DelaneyDesign/rollup.config.js:77:5)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.require.extensions.<computed> [as .js] (/Users/fractal/dev/Commissions/DelaneyDesign/node_modules/.pnpm/rollup@2.47.0/node_modules/rollup/dist/shared/loadConfigFile.js:530:20)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)

I wonder if it's coming from here: Screenshot 2021-05-07 at 10 36 21 PM

Seems to be unaffected by the node version.

Is resolve supposed to be the @rollup/plugin-node-resolve plugin or path.resolve?

jakobrosenberg commented 3 years ago

@FractalHQ it seems that resolve was changed to accept strings instead of objects. Can you check which version of resolve is used?

jakobrosenberg commented 3 years ago

Maybe try dedupe: ['svelte'] instead of the callback.

braebo commented 3 years ago

Doesn't seem to make a difference. These issues for svelte#6159 and svelte#339 points to svelte-preprocess and the filename option not getting the right path.

jakobrosenberg commented 3 years ago

I think you're right. Any idea how to solve it?

braebo commented 3 years ago

It's quite the rabbit hole. Might be this bug in globby#145. A lot of people seem to have worked around it by moving commonjs() to the top of the plugins list according to rollup#3939, but that doesn't seem to help here.

ghostdevv commented 3 years ago

This should be fixed, tag me if not