Closed clarkmcnally closed 5 years ago
I cannot take a deeper look right now, but this might be an issue related to your package manager: try reinstalling the generator after clearing you module cache:
npm rm -g generator-ngx-rocket
npm cache clean --force
npm i -g generator-ngx-rocket
What's you OS/version? Do you use a node version manager, like nvm
, n
or something else?
Environment node - 9.5.0 npm - 6.1.0 generator-ngx-rocket - 6.0.0
I have update ngx rocket
When I execute ngx new
/home/luis/.nvm/versions/node/v9.5.0/lib/node_modules/generator-ngx-rocket/node_modules/conf/index.js:56 throw new Error('Project name could not be inferred. Please specify the
projectName
option.'); ^Error: Project name could not be inferred. Please specify the
projectName
option. at new Conf (/home/luis/.nvm/versions/node/v9.5.0/lib/node_modules/generator-ngx-rocket/node_modules/conf/index.js:56:11) at new NgxCli (/home/luis/.nvm/versions/node/v9.5.0/lib/node_modules/generator-ngx-rocket/cli/index.js:58:20) at Object.(/home/luis/.nvm/versions/node/v9.5.0/lib/node_modules/generator-ngx-rocket/cli/bin/ngx:3:13) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3) at Function.Module.runMain (module.js:701:10) at startup (bootstrap_node.js:190:16)
I have tried ngx new --projectName dummyproject
too
@LuisReinoso strange, seems that the conf
package cannot find the package.json file where it gets the name to same the cli config. Might be related to NVM setup, not sure why it's failing like that.
I will push a quick fix anyways, I'll keep you updated.
Should be fixed in 6.0.1
.
C:\proj>ngx n
\ ./ / ____ ____ | ' \/ ` |> < |--< [] | |-: |=== | |||_, //°\\ ENTERPRISE APP STARTER -~*=> |___/ v8.1.0
(node:10052) UnhandledPromiseRejectionWarning: C:\Users\riv\AppData\Roaming\npm\node_modules\generator-ngx-rocket\generators\app\index.js:30 } catch { ^
SyntaxError: Unexpected token { at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:617:28) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object.get [as ngx-rocket] (C:\Users\riv\AppData\Roaming\npm\node_modules\generator-ngx-rocket\node_modules\yeoman-environment\lib\store.js:47:27) (node:10052) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) (node:10052) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@polu3g can you open a new issue, following the issue template please? We cannot help you if we don't have information about your environment.
Just to let you know - I had exactly the same issue as posted by @polu3g and I was able to resolve it by upgrading Node version (previously I had 8.11.3, now I have last LTS version, i.e. 12.16.3). I use Win 10 64-bit.
whats the min node version supported ? thanks
The min version is currently 10.9
, as shown on the badge on the top of readme here: https://github.com/ngx-rocket/generator-ngx-rocket
You can also find this information in the package.json
file, under the engines
property. If you try installing the package generator-ngx-rocket
from an incompatible Node version, you should also get a warning in the console telling your the minimum supported version.
Environment node - 11.6.0 npm - 6.5.0 generator-ngx-rocket - 5.3.0
Getting this error when running ngx new