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

preact create exits with status 1 #415

Closed
m4r1vs opened this issue Oct 20, 2017 · 14 comments
Closed

preact create exits with status 1 #415

m4r1vs opened this issue Oct 20, 2017 · 14 comments

Comments

@m4r1vs
Copy link

m4r1vs commented Oct 20, 2017

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
when creating a new PWA with following command:
preact create default --name caf-menu --git --force --yarn
I get this output:
⚠ WARN Insufficient command arguments! Prompting...
ℹ INFO Alternatively, run preact create --help for usage info.
? Directory to create the app caf-menu
? Install dependencies Yes
ℹ INFO Assuming you meant preactjs-templates/default...
⠙ Installing dependenciesError: Exited with status 1

And the created folder-structure looks like this:
caf-menu

  • node_modules (contains folders for packages, but they're empty, so node_modules is 0kb)
  • src (contains expected files)
  • .gitignore
  • package.json
  • README.md
  • yarn-error.log

yarn-error.log looks like this:

  /home/Marius/.nvm/versions/node/v8.2.1/bin/node /home/Marius/.nvm/versions/node/v8.2.1/bin/yarn install

PATH: 
  /home/Marius/.nvm/versions/node/v8.2.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/libnvvp:/mnt/c/Python36/Scripts:/mnt/c/Python36:/mnt/c/Program Files (x86)/Intel/iCLS Client:/mnt/c/Program Files/Intel/iCLS Client:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/nodejs:/mnt/c/Program Files/Git/cmd:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/PuTTY:/mnt/c/Program Files/Geth:/mnt/c/Program Files/Intel/WiFi/bin:/mnt/c/Program Files/Common Files/Intel/WirelessCommon:/mnt/c/Program Files (x86)/Intel/iCLS Client:/mnt/c/Program Files/Intel/iCLS Client:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Intel/WiFi/bin:/mnt/c/Program Files/Common Files/Intel/WirelessCommon:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/nodejs:/mnt/c/Program Files/Git/cmd:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/PuTTY:/mnt/c/Ruby23-x64/bin:/mnt/c/Users/mariu/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/mariu/AppData/Local/atom/bin:/mnt/c/Users/mariu/AppData/Roaming/npm:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Users/mariu/AppData/Local/Microsoft/WindowsApps:/snap/bin

Yarn version: 
  0.27.5

Node version: 
  8.2.1

Platform: 
  linux x64

npm manifest: 
  {
    "private": true,
    "name": "caf-menu",
    "version": "0.0.0",
    "license": "MIT",
    "scripts": {
      "start": "if-env NODE_ENV=production && npm run -s serve || npm run -s dev",
      "build": "preact build",
      "serve": "preact build && preact serve",
      "dev": "preact watch",
      "lint": "eslint src"
    },
    "eslintConfig": {
      "extends": "eslint-config-synacor"
    },
    "eslintIgnore": [
      "build/*"
    ],
    "devDependencies": {
      "eslint": "^4.5.0",
      "eslint-config-synacor": "^1.1.0",
      "if-env": "^1.0.0",
      "preact-cli": "^2.0.0"
    },
    "dependencies": {
      "preact": "^8.2.1",
      "preact-compat": "^3.17.0",
      "preact-router": "^2.5.5"
    }
  }

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

Trace: 
  Error: EINVAL: invalid argument, lstat '/mnt/c/Users/mariu/Documents/Projects/caf-menu/node_modules/@types/glob/node_modules/@types/node/index.d.ts'

If the current behavior is a bug, please provide the steps to reproduce.
See above

What is the expected behavior?
That the command doesn't exit with an error and works like it did on preact-cli version 1.4

Please mention other relevant information.

  • node version v8.2.1
  • npm version 5.5.1
  • yarn version 0.27.5
  • Operating system Windows 10 pro 1709 (using Windows Subsystem for Linux)
  • Preact-cli version 2.0.1
@m4r1vs m4r1vs changed the title preact create exists with status 1 preact create exits with status 1 Oct 20, 2017
@m4r1vs
Copy link
Author

m4r1vs commented Oct 20, 2017

After upgrading yarn to v1.2.1 the same bug remains

@m4r1vs
Copy link
Author

m4r1vs commented Oct 20, 2017

See also this and this issue on that topic

@lukeed
Copy link
Member

lukeed commented Oct 20, 2017

I think #409 might fix this issue.

@m4r1vs
Copy link
Author

m4r1vs commented Oct 20, 2017

No, I don't think so, the name in package.json is correct and I think it's a WSL/YARN realated issue. The only reason it might not be is because it worked before on Preact CLI v1.4

@ssteinerx
Copy link

Not sure if this is related, but I tried to create/install with:

preact create--yarn --git --install default ssteinerX-preact
ℹ INFO Assuming you meant preactjs-templates/default...
⠦ Installing dependenciesError: Exited with status 1

And the "name" field in package.json was, literally "{{name}}" which yarn didn't like at all.

There was no log file, just package.json and the src/ directory.

@m4r1vs
Copy link
Author

m4r1vs commented Oct 21, 2017

Yeah, that's another issue. For now add the --name flag to the Preact create command and the name is correct in package.json :)
I've already corrected this bug and now I'm facing the issue I described above

@Dylanderv
Copy link

Hi, I have the same issue right now with:
preact create default new-project
It give me this:

ℹ INFO Assuming you meant preactjs-templates/default...
⠸ Installing dependenciesError: Exited with status 1

The ǹew-project folder is created with:

  • a package.json file:
{
  "private": true,
  "name": "new-project",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "start": "if-env NODE_ENV=production && npm run -s serve || npm run -s dev",
    "build": "preact build",
    "serve": "preact build && preact serve",
    "dev": "preact watch",
    "lint": "eslint src"
  },
  "eslintConfig": {
    "extends": "eslint-config-synacor"
  },
  "eslintIgnore": [
    "build/*"
  ],
  "devDependencies": {
    "eslint": "^4.5.0",
    "eslint-config-synacor": "^1.1.0",
    "if-env": "^1.0.0",
    "preact-cli": "^2.0.0"
  },
  "dependencies": {
    "preact": "^8.2.1",
    "preact-compat": "^3.17.0",
    "preact-router": "^2.5.5"
  }
}

As well as a README.md and a src folder.

If I do a npm start it compile well and the app seems to work.

I'm a beginner with preact and preact-cli, I'm maybe missing something.

@reznord
Copy link
Member

reznord commented Oct 25, 2017

@Dylanderv are you using the latest version of CLI? v2.0.2

@reznord
Copy link
Member

reznord commented Oct 25, 2017

@m4r1vs this is fixed in v2.0.2, it works fine, just checked. Thanks for finding this issue. 😄

@Dylanderv
Copy link

@reznord Yes, I'm using preact-cli@2.0.2

@reznord
Copy link
Member

reznord commented Oct 25, 2017

@Dylanderv ummm....I just checked it in my machine and it was working fine for me. Can you please give me the steps to reproduce this?

@Dylanderv
Copy link

I'm not doing anything more than preact create default new-project.
I first had a problem with my corporate proxy (see #421), but i'm working this around using an external connection without proxy.

I'm using node v8.4.0 and npm 5.3.0 with nvm on Debian stretch.

@developit
Copy link
Member

@Dylanderv are you using Sinopia/Verdaccio by any chance?

@reznord
Copy link
Member

reznord commented Jan 27, 2018

Can't reproduce this in the latest version of CLI (closing for now).

Feel free to re-open if anyone still faces the same issue.

@reznord reznord closed this as completed Jan 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants