Giter Site home page Giter Site logo

Powershell: npm start fails with 'sleep' is not recognized as an internal or external command about cra-template-tailwindcss-typescript HOT 6 CLOSED

dance2die avatar dance2die commented on September 25, 2024
Powershell: npm start fails with 'sleep' is not recognized as an internal or external command

from cra-template-tailwindcss-typescript.

Comments (6)

dance2die avatar dance2die commented on September 25, 2024

Thank you @asharonbaltazar for the compliment :)

Yes. sleep is a *NIX command. If you are running in bash it shoulda work (but not sure if it needs Linux Subsystem for Windows).
If you are using Windows, you can probably alias Start-Sleep PowerShell command to sleep as a workaround.

In the mean time I'd have to find a cross-env equivalent of sleep so it works cross-platform.

from cra-template-tailwindcss-typescript.

austincollinpena avatar austincollinpena commented on September 25, 2024

Why is the sleep even necessary?

from cra-template-tailwindcss-typescript.

dance2die avatar dance2die commented on September 25, 2024

Why is the sleep even necessary?

TL;DR: It's a lazy hack.

There is a brief moment when TW hasn't yet finished converting utilities.
You can simply refresh w/o sleep but I added random sleep time to wait for it.

I am using run-p to run watch:css and react-scripts start in parallel. If I had a used run-s, watch:css would never finish.

from cra-template-tailwindcss-typescript.

akj1608 avatar akj1608 commented on September 25, 2024

how you fix this error..i am getting the same error

from cra-template-tailwindcss-typescript.

dance2die avatar dance2die commented on September 25, 2024

Hi @akj1608.

Is the error message the same?(plz post the error log if you can) It should have been fixed in #19

No access to windows now so can't try it...

from cra-template-tailwindcss-typescript.

akj1608 avatar akj1608 commented on September 25, 2024

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files (x86)\nodejs\node.exe',
1 verbose cli 'C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 info lifecycle [email protected]
start: [email protected]
7 verbose lifecycle [email protected]start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
start: PATH: C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\lenovo\Desktop\mernblog\node_modules.bin;C:\Python39\Scripts;C:\Python39;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\Android\Android Studio\jre\bin;C:\MinGW\bin;C:\Program Files (x86)\nodejs;C:\ProgramData\chocolatey\bin;D:\Projects\Anaconda;D:\Projects\Anaconda\Library\mingw-w64\bin;D:\Projects\Anaconda\Library\usr\bin;D:\Projects\Anaconda\Library\bin;D:\Projects\Anaconda\Scripts;C:\Program Files\MySQL\MySQL Shell 8.0\bin;C:\Ruby30-x64\bin;C:\Users\lenovo\AppData\Local\Microsoft\WindowsApps;C:\Users\lenovo\AppData\Local\Programs\Microsoft VS Code\bin;C:\src\flutter\bin;C:\Users\lenovo\AppData\Roaming\npm
9 verbose lifecycle [email protected]start: CWD: C:\Users\lenovo\Desktop\mernblog
10 silly lifecycle [email protected]
start: Args: [ '/d /s /c', 'run-p watch:css react-scripts:start' ]
11 silly lifecycle [email protected]start: Returned: code: 1 signal: null
12 info lifecycle [email protected]
start: Failed to exec start script
13 verbose stack Error: [email protected] start: run-p watch:css react-scripts:start
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:400:28)
13 verbose stack at ChildProcess. (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:400:28)
13 verbose stack at maybeClose (internal/child_process.js:1055:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\lenovo\Desktop\mernblog
16 verbose Windows_NT 10.0.19043
17 verbose argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "start"
18 verbose node v14.17.5
19 verbose npm v6.14.14
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: run-p watch:css react-scripts:start
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

from cra-template-tailwindcss-typescript.

Related Issues (8)

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.