Closed Xotic750 closed 6 years ago
I have also tried this on my Apple Mac with the same result.
Grahams-MBP:vue-types grahamfairweather$ npm install
npm WARN deprecated babel-preset-es2015@6.24.1: ๐ Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
> fsevents@1.1.3 install /Users/grahamfairweather/.private/vue-types/node_modules/fsevents
> node install
[fsevents] Success: "/Users/grahamfairweather/.private/vue-types/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
> uws@0.14.5 install /Users/grahamfairweather/.private/vue-types/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0
> phantomjs-prebuilt@2.1.16 install /Users/grahamfairweather/.private/vue-types/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-macosx.zip
Saving to /var/folders/5p/23w_3pyx0_57p25f1ppys6340000gn/T/phantomjs/phantomjs-2.1.1-macosx.zip
Receiving...
[========================================] 100%
Received 16746K total.
Extracting zip contents
Removing /Users/grahamfairweather/.private/vue-types/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /var/folders/5p/23w_3pyx0_57p25f1ppys6340000gn/T/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1515940661369/phantomjs-2.1.1-macosx -> /Users/grahamfairweather/.private/vue-types/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /Users/grahamfairweather/.private/vue-types/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
> wd@1.5.0 install /Users/grahamfairweather/.private/vue-types/node_modules/wd
> node scripts/build-browser-scripts
> sauce-connect-launcher@1.2.3 postinstall /Users/grahamfairweather/.private/vue-types/node_modules/sauce-connect-launcher
> node scripts/install.js || nodejs scripts/install.js
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN eslint-config-vue@2.0.2 requires a peer of eslint@^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
added 928 packages in 35.856s
Grahams-MBP:vue-types grahamfairweather$ npm run test
> vue-types@1.1.1 test /Users/grahamfairweather/.private/vue-types
> cross-env BABEL_ENV=rollup karma start karma.conf.js --single-run --browsers PhantomJS
START:
preferring built-in module 'util' over local alternative at '/Users/grahamfairweather/.private/vue-types/node_modules/util/util.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
preferring built-in module 'util' over local alternative at '/Users/grahamfairweather/.private/vue-types/node_modules/util/util.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
preferring built-in module 'util' over local alternative at '/Users/grahamfairweather/.private/vue-types/node_modules/util/util.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
'util' is imported by node_modules/object-inspect/util.inspect.js, but could not be resolved โ treating it as an external dependency
preferring built-in module 'util' over local alternative at '/Users/grahamfairweather/.private/vue-types/node_modules/util/util.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
'util' is imported by node_modules/object-inspect/util.inspect.js, but could not be resolved โ treating it as an external dependency
preferring built-in module 'util' over local alternative at '/Users/grahamfairweather/.private/vue-types/node_modules/util/util.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
preferring built-in module 'util' over local alternative at '/Users/grahamfairweather/.private/vue-types/node_modules/util/util.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
preferring built-in module 'util' over local alternative at '/Users/grahamfairweather/.private/vue-types/node_modules/util/util.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
preferring built-in module 'util' over local alternative at '/Users/grahamfairweather/.private/vue-types/node_modules/util/util.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
preferring built-in module 'util' over local alternative at '/Users/grahamfairweather/.private/vue-types/node_modules/util/util.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
'util' is imported by commonjs-external:util, but could not be resolved โ treating it as an external dependency
preferring built-in module 'util' over local alternative at '/Users/grahamfairweather/.private/vue-types/node_modules/util/util.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
'util' is imported by commonjs-external:util, but could not be resolved โ treating it as an external dependency
Creating a browser bundle that depends on Node.js built-in module ('util'). You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins
No name was provided for external module 'util' in options.globals โ guessing 'util'
Creating a browser bundle that depends on Node.js built-in module ('util'). You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins
No name was provided for external module 'util' in options.globals โ guessing 'util'
14 01 2018 15:37:56.704:INFO [karma]: Front-end scripts not present. Compiling...
14 01 2018 15:37:57.044:INFO [karma]: Karma v2.0.0 server started at http://0.0.0.0:9876/
14 01 2018 15:37:57.044:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
14 01 2018 15:37:57.049:INFO [launcher]: Starting browser PhantomJS
14 01 2018 15:37:59.570:INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: Connected on socket rKzlH1-oKfb32ZrDAAAA with id 88242522
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
{
"message": "ReferenceError: Can't find variable: util\nat test/index.spec.js:5555:7",
"str": "ReferenceError: Can't find variable: util\nat test/index.spec.js:5555:7"
}
Finished in 0.054 secs / 0 secs @ 15:37:59 GMT+0100 (CET)
SUMMARY:
โ 0 tests completed
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
{
"message": "ReferenceError: Can't find variable: util\nat test/utils.spec.js:4630:7",
"str": "ReferenceError: Can't find variable: util\nat test/utils.spec.js:4630:7"
}
โ Error while running the tests! Exit code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-types@1.1.1 test: `cross-env BABEL_ENV=rollup karma start karma.conf.js --single-run --browsers PhantomJS`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-types@1.1.1 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Update available 5.5.1 โ 5.6.0 โ
โ Run npm i -g npm to update โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/grahamfairweather/.npm/_logs/2018-01-14T14_37_59_667Z-debug.log
Hi
looks like some nested dependencies not tracked in package.json
had changed.
As a quick fix you can:
1) install rollup-plugin-node-builtins
(npm i rollup-plugin-node-builtins --save-dev
)
2) change karma.conf.js
rollupPreprocessor
value to (changes marked in uppercase):
rollupPreprocessor: {
plugins: [
require('rollup-plugin-node-resolve')({
preferBuiltins: true // <-- ADD THIS CONFIGURATION
}), //eslint-disable-line
require('rollup-plugin-commonjs')(), //eslint-disable-line
require('rollup-plugin-babel')({ //eslint-disable-line
exclude: 'node_modules/**'
}),
require('rollup-plugin-replace')({ //eslint-disable-line
'process.env.NODE_DEBUG': !production
}),
require('rollup-plugin-stub')(), //eslint-disable-line
require('rollup-plugin-node-globals')(), //eslint-disable-line
require('rollup-plugin-node-builtins')() // <-- ADD THE ROLLUP PLUGIN
],
format: 'iife',
name: 'VueTypes',
sourcemap: 'inline'
},
Let me know if it works for you.
Thanks, Made the changes and the tests now run.
Cool!
Feel free to ping me for any other issue and (of course) for suggestions. During the next few days I'll be on the move so I'm not sure I'll be able to work on the codebase, but I'll release a proper patch ASAP.
I really like the concept of this project and I'd like to propose its use for a project that I am involved in, but it requires some changes to meet requirements. I'd like to be able to PR those changes here rather than maintain a separate fork, if you are interested?
I'd happily make a PR for the above changes?
Hi!
thanks. Yes we can discuss the needed changes and see if they fit into the project.
Of course the one you posted are totally fine. I'll add you as collaborator to the repo.
Thank you for your contributions!
I cloned your repo, ran
npm install
: didn't witness any problems here apart from some deprecation notices.Then I tried
npm run test
an get the following:I made sure that I am using node as specified in the
.nvmrc
I have also tried with
lts/carbon
with the same result,With
npm run test:all
I get a similar result:My environment:
I'm wondering what is wrong or missing?