tools: polymer init application missing name?

Just installed the polymer-cli on OS X. After that I tried creating an application using:

polymer init application

I get the following:

info:    Running template application
error { [AssertionError: A name parameter is required to create a storage]
  name: 'AssertionError',
  actual: '',
  expected: true,
  operator: '==',
  message: 'A name parameter is required to create a storage',
  generatedMessage: false }
AssertionError: A name parameter is required to create a storage
    at new Storage (/usr/local/lib/node_modules/polymer-cli/node_modules/yeoman-generator/lib/util/storage.js:24:3)
    at ApplicationGenerator.Base._getStorage (/usr/local/lib/node_modules/polymer-cli/node_modules/yeoman-generator/lib/base.js:665:10)
    at ApplicationGenerator.Base (/usr/local/lib/node_modules/polymer-cli/node_modules/yeoman-generator/lib/base.js:157:22)
    at ApplicationGenerator (/usr/local/lib/node_modules/polymer-cli/lib/init/application/application.js:15:14)
    at Environment.instantiate (/usr/local/lib/node_modules/polymer-cli/node_modules/yeoman-environment/lib/environment.js:328:10)
    at Environment.create (/usr/local/lib/node_modules/polymer-cli/node_modules/yeoman-environment/lib/environment.js:305:15)
    at Environment.run (/usr/local/lib/node_modules/polymer-cli/node_modules/yeoman-environment/lib/environment.js:364:24)
    at runGenerator (/usr/local/lib/node_modules/polymer-cli/lib/commands/init.js:65:29)
    at /usr/local/lib/node_modules/polymer-cli/lib/commands/init.js:80:21
    at Environment.resolver.lookup (/usr/local/lib/node_modules/polymer-cli/node_modules/yeoman-environment/lib/resolver.js:50:12)

I was expecting polymer-cli to ask for the project name or use the directory name as the default. While installing polymer-cli there where some warnings not sure they are related or not:

$ sudo npm install -g polymer-cli
Password:
npm WARN deprecated cross-spawn-async@2.2.4: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

Updating lodash and trying to install polymer-cli again. Will report back!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Try running it in an empty directory and it works for 4.4.4 and 6.2.0

mkdir myapp && cd myapp
polymer init --name=application

It was broken for me too, but I think the issue is that I was running it inside of an existing Laravel project which I’m guessing breaks things…could it be the package.json file causing some issues? I’m afraid I don’t know enough about that file to debug what it could be.

As a test I dropped the package.json from my Laravel project into an empty directory and it causes the problem again.

{
  "private": true,
  "scripts": {
    "prod": "gulp --production",
    "dev": "gulp watch"
  },
  "devDependencies": {
    "gulp": "^3.9.1",
    "laravel-elixir": "^5.0.0",
    "bootstrap-sass": "^3.3.0"
  }
}