Comments (3)
npm run disable
should rename vaadin-usage-statistics.js
to vaadin-usage-statistics.js.bak
and then vaadin-usage-statistics-optout.js
to vaadin-usage-statistics.js
. Sounds like thins goes wrong somehow. Check what is in node_modules/@vaadin/vaadin-usage-statistics
after running npm run disable
from vaadin-usage-statistics.
Having the same issue, and did a bit of digging. Basically what seems to happen is this, assuming that node_modules
doesn't exist in the beginning, and .npmrc
contains settings for opting out.
- @vaadin/vaadin-usage-statistics is installed, and runs
postinstall
(check.js) - check.js finds that collection is disabled, and renames
vaadin-usage-statistics.js
tovaadin-usage-statistics.js.bak
, and thenvaadin-usage-statistics-optout.js
tovaadin-usage-statistics.js
- "something" happens that runs @vaadin/vaadin-usage-statistics
postinstall
(check.js) again - check.js finds that collection is disabled, and renames
vaadin-usage-statistics.js
tovaadin-usage-statistics.js.bak
... and then fails to renamevaadin-usage-statistics-optout.js
, because it doesn't exist anymore since step 2.
At this point the only thing you can do is remove node_modules/@vaadin/vaadin-usage-statistics
and run npm install
again.
IMHO this is a bug in @vaadin/vaadin-usage-statistics, it shouldn't rename the source files, but rather have a version for optin and optout, and copy the correct one onto the bare name.
For reproduction I tried this:
$ rm -rf node_modules/@vaadin/vaadin-usage-statistics/
$ npm install
> @vaadin/[email protected] postinstall /home/travis/build/.../node_modules/@vaadin/vaadin-usage-statistics
> node check.js
You have disabled Vaadin development time usage statistics collection. To re-enable, run:
npm explore @vaadin/vaadin-usage-statistics -- npm run enable
For more details, see https://github.com/vaadin/vaadin-usage-statistics
added 1 package from 1 contributor in 9.347s
$ npm install
up to date in 8.557s
$ npm explore @vaadin/vaadin-usage-statistics -- npm run postinstall
> @vaadin/[email protected] postinstall /home/travis/build/.../node_modules/@vaadin/vaadin-usage-statistics
> node check.js
You have disabled Vaadin development time usage statistics collection. To re-enable, run:
npm explore @vaadin/vaadin-usage-statistics -- npm run enable
For more details, see https://github.com/vaadin/vaadin-usage-statistics
File not found!
$ ls /home/travis/build/Collaborne/collaborne-polaris-app/node_modules/@vaadin/vaadin-usage-statistics
check.js LICENSE package.json README.md vaadin-usage-statistics.js.bak
from vaadin-usage-statistics.
Looked further through our build logs, and found the "something": We run npm rebuild --update-binary
whenever the NodeJS version changes to force updates to certain dependencies with native libraries, and that one does trigger a postinstall for everything.
from vaadin-usage-statistics.
Related Issues (13)
- Using optout branch with bower --force-latest. HOT 2
- npm version should not depend on Polymer 3
- Optout instructions for npm
- Remove list of Vaadin elements HOT 1
- Usage stats not working
- options in package.json HOT 3
- Output message only once per installation HOT 9
- Missing export with "npm i --ignore-script"
- Create TypeScript definitions for P3 HOT 1
- Missing script disable in 2.1.1 HOT 2
- Even disabled, vaadin-usage-statistics pollutes `window.localStorage` HOT 4
- Synchronize release with version defined in package.json HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vaadin-usage-statistics.