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

npm init solid app-ts ... fails on Windows 10 (and WSL2) #212

Closed
devjev opened this issue Aug 10, 2020 · 6 comments
Closed

npm init solid app-ts ... fails on Windows 10 (and WSL2) #212

devjev opened this issue Aug 10, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@devjev
Copy link

devjev commented Aug 10, 2020

Output for running npm init solid app-ts example-app on WSL2 Ubuntu as an example:

npx: installed 90 in 8.315s

Creating a new Solid app in <...>/example-app.

Installing packages. This might take a couple of minutes.
Installing solid-js, and solid-scripts...


> core-js@2.6.11 postinstall <...>/example-app/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.6.5 postinstall <...>/example-app/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

+ @types/jest@26.0.9
+ @types/node@14.0.27
+ typescript@3.9.7
+ solid-scripts@0.0.36
+ solid-js@0.18.14
added 1796 packages from 695 contributors and audited 1804 packages in 112.333s

53 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

<...>/example-app/node_modules/fs-extra/lib/copy-sync/copy-sync.js:185
    throw new Error('Source and destination must not be the same.')
    ^

Error: Source and destination must not be the same.
    at checkPaths (<...>/example-app/node_modules/fs-extra/lib/copy-sync/copy-sync.js:185:11)
    at Object.copySync (<...>/example/example-app/node_modules/fs-extra/lib/copy-sync/copy-sync.js:25:20)
    at module.exports (<...>/example-app/node_modules/solid-scripts/scripts/init.js:126:8)
    at [eval]:3:14
    at Script.runInThisContext (vm.js:122:20)
    at Object.runInThisContext (vm.js:329:38)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at evalScript (internal/bootstrap/node.js:590:27)
    at startup (internal/bootstrap/node.js:265:9)

Aborting installation.
  node  has failed.

Deleting generated file... node_modules
Deleting generated file... package-lock.json
Deleting generated file... package.json
Deleting example-app/ from <...>
Done.
@devjev
Copy link
Author

devjev commented Aug 10, 2020

Node version: v10.19.0
NPM: 6.14.4

@devjev
Copy link
Author

devjev commented Aug 10, 2020

Maybe has something to do with this?

@ryansolid
Copy link
Member

Ok I will give this a shot tonight. I actually do most of my dev on a WSL2 windows machine so I will see if I can reproduce. I am on Node 12 mind you. But I will see maybe something has updated/changed since I last installed.

@ryansolid
Copy link
Member

Hmm.. this is going to be trickier than I was hoping. I can't reproduce. I tried both my Node 12 setup and the exact version of Node and npm posted in the issue. I tried a few different project names.

So attacking it from the other side your guess seems reasonable. It is the command that copies the template folder to the application path. For it to be the destination makes no sense. I've updated fs-extra to latest version as the version previously there in the package is 2 years old.

Can you give it a try and let me know if that works? I appreciate your patience.

@ryansolid ryansolid added the bug Something isn't working label Aug 11, 2020
@devjev
Copy link
Author

devjev commented Aug 11, 2020

I've checked it and that fixed the problem. Thank you very much!

@ryansolid
Copy link
Member

Awesome that makes me happy. The last thing I wanted to be doing is to be looking into Node file system idiosyncracies. Best of luck with playing with the starter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants