Giter Site home page Giter Site logo

Comments (9)

et avatar et commented on May 18, 2024 1

macOs v10.12.6

Also, I wouldn't worry about this issue too much. While nps-scripts-info is cool, removing it doesn't break the project in anyway for me.
Btw -- I did build a node module with this (private repo) and everything else has gone swimmingly. Thanks for you work! This project was a huge time saver for me as I dip my feet into the typescript waters.

from typescript-starter.

bitjson avatar bitjson commented on May 18, 2024

Hey @et, thanks for submitting the issue!

I'm having trouble reproducing. Could you clarify how you got there?

You ran:

npx typescript-starter

And then which options did you select?

Thanks!

from typescript-starter.

et avatar et commented on May 18, 2024

Thanks for the response @bitjson. Sorry I didn't provide more detail, hopefully this helps:

❯ tmp npx typescript-starter
npx: installed 353 in 18.532s

 _                                   _       _            _             _
| |_ _   _ _ __   ___  ___  ___ _ __(_)_ __ | |_      ___| |_ __ _ _ __| |_ ___ _ __
| __| | | | '_ \ / _ \/ __|/ __| '__| | '_ \| __|____/ __| __/ _` | '__| __/ _ \ '__|
| |_| |_| | |_) |  __/\__ \ (__| |  | | |_) | ||_____\__ \ || (_| | |  | ||  __/ |
 \__|\__, | .__/ \___||___/\___|_|  |_| .__/ \__|    |___/\__\__,_|_|   \__\___|_|
     |___/|_|                         |_|

? 📦 Enter the new package name: test-test-test
? 🔨 What are you making? Node.js application
? 💬 Enter the package description: This is my test
? 🚄 Will this project use npm or yarn? yarn
? 🚀 More fun stuff: Enable stricter type-checking, Enable tslint-immutable, Include VS Code debugging config

Cloning into 'test-test-test'...
remote: Counting objects: 48, done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 48 (delta 0), reused 21 (delta 0), pack-reused 0
Unpacking objects: 100% (48/48), done.
Note: checking out 'e99dd8f64e2bc1d6f446dee84d2a75e92a10ea54'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>


  Cloned at commit: e99dd8f64e2bc1d6f446dee84d2a75e92a10ea54

✔ Updating package.json
✔ Updating .gitignore
✔ Updating LICENSE
✔ Deleting unnecessary files
✔ Removing traces of the CLI
✔ Creating README.md
✔ tsconfig: don't include "dom" lib
✔ Initializing git repository...

Created test-test-test 🎉

yarn install v1.5.1
info No lockfile found.
$ node -e "if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('test-test-test must be installed with Yarn: https://yarnpkg.com/')"
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning "ava > @ava/babel-preset-stage-4 > @babel/[email protected]" has incorrect peer dependency "@babel/[email protected]".
[5/5] 📃  Building fresh packages...
success Saved lockfile.
✨  Done in 23.54s.

❯ tmp [1m 9s] cd test-test-test

❯ test-test-test master* ls
LICENSE              bin                  package.json         tsconfig.json        tslint.json
README.md            node_modules         src                  tsconfig.module.json yarn.lock

❯ test-test-test master* npm run info

> [email protected] info /Users/REDACTED/tmp/test-test-test
> npm-scripts-info

env: node\r: No such file or directory
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] info: `npm-scripts-info`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] info 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!     /Users/REDACTED/.npm/_logs/2018-03-16T01_53_12_714Z-debug.log

I also pushed up the state of the repo

from typescript-starter.

bitjson avatar bitjson commented on May 18, 2024

Thanks for the info @et! I'll look into it a bit more. Just to clarify, what OS are you on? (I'm not seeing the issue on macOS 10.13.3.)

from typescript-starter.

bitjson avatar bitjson commented on May 18, 2024

Thanks, I’m glad you’ve found it useful!

I’ll leave this issue open for now, maybe we’ll get it figured out eventually.

from typescript-starter.

cspotcode avatar cspotcode commented on May 18, 2024

Do you think this can be solved with a .gitattributes that forces all files to checkout with unix line-endings? I imagine something is extracting the shebang from a script and seeing that the executable's name is node\r, based on splitting on \n they way bash and posix would do.

EDIT: asking @et for the output of git config --list with personal data redacted might be helpful.

from typescript-starter.

bitjson avatar bitjson commented on May 18, 2024

Ideally we wouldn’t need to provide such platform-specific configuration-overriding for edge cases like this. The problem isn’t specific to creating a new typescript project, it’s just a general issue for projects being contributed to by both Windows and other OS users.

The problem seems to be with the npm-scripts-info package. @et could you open up an issue there?

(I also still have no idea why I wouldn’t be able to reproduce it on macOS myself.)

from typescript-starter.

et avatar et commented on May 18, 2024

srph/npm-scripts-info#13

from typescript-starter.

bitjson avatar bitjson commented on May 18, 2024

I published a version of npm-scripts-info to fix this, I'll get it switched out in this project soon.

from typescript-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.