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

Generated app not starting with node@7.6.0 and npm@5.0.3 #959

Closed
1 of 5 tasks
marshallswain opened this issue Jun 6, 2017 · 13 comments
Closed
1 of 5 tasks

Generated app not starting with node@7.6.0 and npm@5.0.3 #959

marshallswain opened this issue Jun 6, 2017 · 13 comments
Assignees
Labels

Comments

@marshallswain
Copy link
Member

marshallswain commented Jun 6, 2017

How often can you reproduce it?

  • Always
  • Sometimes
  • Rarely
  • Unable
  • I didn’t try

After creating an application with donejs add app pwa-test, when I open the root directory and run donejs develop, I get the following error:

screen shot 2017-06-05 at 7 46 01 pm

I see that done-serve is in the package.json dependencies, but it's not getting installed into node_modules/.bin:

screen shot 2017-06-05 at 7 53 11 pm

Maybe this is an npm bug. I'm using npm@5.0.3 with node@7.6.0.

Steps to reproduce:

  • npm install -g npm donejs
  • donejs add app pwa-test
  • cd-pwa-test
  • donejs develop

Expected results:

The app should start without a problem.

Actual results:

The above error is thrown.

Environment:

Software Version
donejs -V 1.0.0
node -v 7.6.0
npm -v 5.0.3
Operating system macOS 10.12.5
@marshallswain
Copy link
Member Author

However, if I delete the node_modules folder and the package.lock.json and npm install again, it works as expected.

@phillipskevin
Copy link
Contributor

@obaidott can you look into this while you're working on adding Node 8 to CI?

@matthewp
Copy link
Contributor

matthewp commented Jun 6, 2017

My guess is that the way donejs add app works is that the new lockfile gets created prevents additional packages from being installed. We might want to use the flag to disable the lockfile (if that is indeed the problem, just a guess here).

@frank-dspeed
Copy link
Contributor

@matthewp this can be closed can't reproduce error. donejs add app + donejs develop works under node 7.6 even under node 8.1.2

@matthewp
Copy link
Contributor

Thanks.

@chasenlehara
Copy link
Member

This is still an issue. I just tested with npm 5.0.3 & Node 8.1.2 and I got the same issues as what @marshallswain originally reported.

@chasenlehara chasenlehara self-assigned this Jun 26, 2017
@marshallswain
Copy link
Member Author

marshallswain commented Jun 26, 2017

Looks like others are having this same issue, related to package.lock.json: https://codeburst.io/disabling-package-lock-json-6be662f5b97d

It might be a quick easy fix to use --no-package-lock during the first npm install at

// install donejs-cli
function installCli(version, options) {
var pkg = 'donejs-cli@' + utils.versionRange(version);
var npmArgs = [ 'install', pkg, '--loglevel', 'error' ];
return utils.spawn('npm', npmArgs, options);
}

@frank-dspeed
Copy link
Contributor

@chasenlehara why do i not get that error? maybe because using yarn right?

@chasenlehara
Copy link
Member

Probably! The original issue makes it pretty clear that npm was being used. Please don’t leave comments saying issues are fixed if you haven’t reproduced the original issue and can confirm it was fixed. 😊

@frank-dspeed
Copy link
Contributor

frank-dspeed commented Jun 26, 2017

@chasenlehara i reproduced it i runned a donejs app a fresh one under node 7.6 and 8.1 but i am using docker that means i mount the project dir and then on startup use yarn :)

@andrejewski
Copy link
Contributor

This has been solved. It took making changes to both donejs/donejs and donejs/cli, but now neither step will create a package-lock.json file. In order to close this issue, a donejs/donejs patch release will have to be made with @chasenlehara's #978 changes, the donejs/cli changes are in its v1.0.2.

@frank-dspeed
Copy link
Contributor

frank-dspeed commented Jun 29, 2017

@andrejewski so you mean

npm install -g donejs@^1.0.1

@andrejewski
Copy link
Contributor

@frank-dspeed No, the fix for donejs will be released as DoneJS v1.0.1. At which point people can update using npm install -g donejs and this issue can be closed.

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

No branches or pull requests

7 participants