Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

npx @neutrinojs/create-project doesn't install devDependencies #1419

Closed
BillRobitskeJr opened this issue Jun 16, 2019 · 2 comments
Closed

npx @neutrinojs/create-project doesn't install devDependencies #1419

BillRobitskeJr opened this issue Jun 16, 2019 · 2 comments

Comments

@BillRobitskeJr
Copy link

BillRobitskeJr commented Jun 16, 2019

Bug or issue?

Please try to answer the following questions:

  • What version of Neutrino are you using? N/A, issue with current create-project
  • Are you trying to use any presets? If so, which ones, and what versions?
  • Are you using the Yarn client or the npm client? What version? Using npm 6.4.1 (yarn 0.18.1 is installed, but shouldn't be used)
  • What version of Node.js are you using? node 8.16.0
  • What operating system are you using? Ubuntu for Windows 10
  • What did you do? Ran npx @neutrinojs/create-project test-component to start a new project
  • What did you expect to happen? Project to be created with all dependencies installed
  • What actually happened, contrary to your expectations? Project was created, but no devDependencies were installed or added to package.json
➜  npx @neutrinojs/create-project test-component --debug
npx: installed 343 in 20.624s
                          _          _
      _ __    ___  _   _ | |_  _ __ (_) _ __    ___
     | '_ \  / _ \| | | || __|| '__|| || '_ \  / _ \
     | | | ||  __/| |_| || |_ | |   | || | | || (_) |
     |_| |_| \___| \__,_| \__||_|   |_||_| |_| \___/
    
Welcome to Neutrino! 👋
To help you create your new project, I am going to ask you a few questions.

? 🤔  First up, what would you like to create? Components
? 🤔  Next, what kind of components would you like to create? React Components
? 🤔  Would you like to add a test runner to your project? Jest
? 🤔  Would you like to add linting to your project? Airbnb style rules

👌  Looks like I have all the info I need. Give me a moment while I create your project!

yarn init v0.18.1
warning The yes flag has been set. This will automatically answer yes to all questions which may have security implications.
success Saved package.json
Done in 0.05s.
   create test-component/package.json
   create test-component/.neutrinorc.js
   create test-component/src/components/HelloWorld/index.jsx
   create test-component/src/index.jsx
   create test-component/test/simple_test.js
   create test-component/.eslintrc.js

⏳  Installing devDependencies: @neutrinojs/react-components@^8.3.0, neutrino@^8.3.0, prop-types, react, react-dom, @neutrinojs/jest@^8.3.0, @neutrinojs/airbnb@^8.3.0
yarn add v0.18.1
info No lockfile found.
[1/4] Resolving packages...
warning neutrino > fluture > inspect-f@1.2.2: Package does not work as advertised and was discontinued
warning @neutrinojs/jest > eslint > file-entry-cache > flat-cache > circular-json@0.3.3: CircularJSON is in maintenance
only, flatted is its successor.
warning @neutrinojs/react-components > @neutrinojs/react > @neutrinojs/web > @neutrinojs/style-loader > extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
warning @neutrinojs/react-components > @neutrinojs/react > @neutrinojs/web > @neutrinojs/style-loader > css-loader > cssnano > autoprefixer > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @neutrinojs/react-components > @neutrinojs/react > @neutrinojs/web > @neutrinojs/style-loader > css-loader > cssnano > postcss-merge-rules > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @neutrinojs/react-components > @neutrinojs/react > @neutrinojs/web > @neutrinojs/style-loader > css-loader > cssnano > postcss-merge-rules > caniuse-api > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @neutrinojs/react-components > @neutrinojs/react > @neutrinojs/web > @neutrinojs/style-loader > css-loader > cssnano > postcss-minify-selectors > postcss-selector-parser > flatten@1.0.2: I wrote this module a very long time ago; you should use something else.
warning @neutrinojs/react-components > @neutrinojs/react > @neutrinojs/web > @neutrinojs/minify > @neutrinojs/image-minify > imagemin-mozjpeg > mozjpeg > bin-build > download > gulp-decompress > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
[2/4] Fetching packages...
error neutrino@8.3.0: The engine "yarn" is incompatible with this module. Expected version ">=1.2.1".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
⏳  Performing one-time lint

Hooray, I successfully created your project!

I have added a few yarn scripts to help you get started:
  • To build your project run:  yarn build
  • To start your project locally run:  yarn start
  • To execute tests run:  yarn test
  • To lint your project manually run:  yarn lint
    You can also fix some linting problems with:  yarn lint --fix

Now change your directory to the following to get started:
  cd test-component

❤️  Neutrino
@BillRobitskeJr
Copy link
Author

Upgrading yarn fixed the issue; however, why is create-project using yarn if I called it using npx?

@edmorley
Copy link
Member

Hi! Thank you for opening an issue. Neutrino 8 requires yarn 1.2.1 or newer, hence the error seen above. However I agree that is a bug that it's being used if create-project is run via npx. As such, this is a duplicate of #1260, which has just been fixed by #1396 (on master only at the moment). The workaround in the meantime would be to remove yarn from PATH temporarily before running create-project, or else to upgrade or uninstall yarn.

I would also recommend not using Neutrino 8, and instead trying the v9 release candidates, since they fix many bugs. (The Neutrino version still applies to create-project). See #1129 for details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants