I've just started using UIKit3 (getuitkit.com) and I keep getting this error when npm run watch is running – I also can't use npm run compile either. Any ideas?
This is the error I get with watch...
[compile-less] /Users/Michael/Sites/uikit-3/build/icons.js:10
glob(custom, (err, folders) =>
^^
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
[compile-less] [nodemon] app crashed - waiting for file changes before starting...
And this for compile...
/Users/Michael/Sites/uikit-3/build/icons.js:10
glob(custom, (err, folders) =>
^^
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
npm ERR! Darwin 16.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "icons"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! uikit#3.0.0-beta.18 icons: `node build/icons`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the uikit#3.0.0-beta.18 icons script 'node build/icons'.
npm ERR! This is most likely a problem with the uikit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/icons
npm ERR! You can get their info via:
npm ERR! npm owner ls uikit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Michael/Sites/uikit-3/npm-debug.log
npm ERR! Darwin 16.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "compile-less"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! uikit#3.0.0-beta.18 compile-less: `npm run icons && node build/less`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the uikit#3.0.0-beta.18 compile-less script 'npm run icons && node build/less'.
npm ERR! This is most likely a problem with the uikit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run icons && node build/less
npm ERR! You can get their info via:
npm ERR! npm owner ls uikit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Michael/Sites/uikit-3/npm-debug.log
npm ERR! Darwin 16.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "compile"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! uikit#3.0.0-beta.18 compile: `npm run compile-less && npm run compile-js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the uikit#3.0.0-beta.18 compile script 'npm run compile-less && npm run compile-js'.
npm ERR! This is most likely a problem with the uikit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run compile-less && npm run compile-js
npm ERR! You can get their info via:
npm ERR! npm owner ls uikit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Michael/Sites/uikit-3/npm-debug.log
You seem to be running node v0.12.0. UIkit's build tools require a minimum version of 4.4+. Please update to a current Node version. https://nodejs.org/en/
Related
I want to build a website using React witht he help of npm and webpack. I have installed npm in my machine and now I am trying to install webpack in my machine.
I ran the following command:
npm i webpack -S
but then it throws error. Please find the error log below:
npm http 200 https://registry.npmjs.org/is-buffer
npm http GET https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz
npm http 200 https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz
> uglifyjs-webpack-plugin#0.4.6 postinstall /usr/local/litle-home/tkale/cvs/scurvyReact/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
module.js:340
throw err;
^
Error: Cannot find module 'sync-exec'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/litle-home/tkale/cvs/scurvyReact/node_modules/webpack/node_modules/uglifyjs-webpack-plugin/lib/post_install.js:9:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
npm ERR! weird error 8
npm ERR! Error: ENOENT, open '/usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423156518-0.5044926188420504/package/fp/wrapperValue.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 2.6.32-696.10.2.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "i" "webpack" "-S"
npm ERR! cwd /usr/local/litle-home/tkale/cvs/scurvyReact
npm ERR! node -v v0.10.48
npm ERR! npm -v 1.3.6
npm ERR! path /usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423156518-0.5044926188420504/package/fp/wrapperValue.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! tar pack Error reading /usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423163147-0.8487295310478657/package
npm ERR! addLocalDirectory Could not pack "/usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423163147-0.8487295310478657/package" to "/usr/local/litle-home/tkale/.npm/es5-ext/0.10.35/package.tgz"
npm ERR! Error: ENOENT, lstat '/usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423153445-0.9213839254807681/package/node_modules/ajv/dist/regenerator.min.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 2.6.32-696.10.2.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "i" "webpack" "-S"
npm ERR! cwd /usr/local/litle-home/tkale/cvs/scurvyReact
npm ERR! node -v v0.10.48
npm ERR! npm -v 1.3.6
npm ERR! path /usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423153445-0.9213839254807681/package/node_modules/ajv/dist/regenerator.min.js
npm ERR! fstream_path /usr/local/litle-home/tkale/tmp/npm-1220-UQjjVtpG/1508423153445-0.9213839254807681/package/node_modules/ajv/dist/regenerator.min.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/local/litle-home/tkale/cvs/scurvyReact/npm-debug.log
npm ERR! not ok code 0
Incase it helps, also find package.json file below:
{
"name": "React",
"version": "1.0.0",
"description": "Building website using React with help of npm and webpack",
"main": "index.js",
"scripts": {
"test": "karma start",
"start": "node server.js",
"_comment": "start in the above line tells heroku how to start our app"
},
"author": "Tushar",
"license": "XYZ"
}
Could you please help me solve this issue.
If I read the error correctly, you seem to be using a really old version of node and npm. Try updating those to the LTS or even the latest release.
You can get the latest versions and/or installation instructions here.
I did setup https://github.com/vuejs/vue-cli Vue CLI with the webpack template and it works fine.
But when i change something in template file it throws below error.
Kindly help on the below issue,
> Starting dev server...
DONE Compiled successfully in 2703ms 6:00:35 PM
> Listening at http://localhost:8083
WAIT Compiling... 6:01:05 PM
c:\xampp\htdocs\myproject\node_modules\enhanced-resolve\lib\CachedInputFileSy
stem.js:145
if(key.startsWith(what))
^
TypeError: Cannot read property 'startsWith' of undefined
at Storage.purge (c:\xampp\htdocs\myproject\node_modules\enhanced-resolve
\lib\CachedInputFileSystem.js:145:10)
at Storage.purge (c:\xampp\htdocs\myproject\node_modules\enhanced-resolve
\lib\CachedInputFileSystem.js:150:9)
at CachedInputFileSystem.purge (c:\xampp\htdocs\myproject\node_modules\en
hanced-resolve\lib\CachedInputFileSystem.js:259:20)
at EventEmitter.watcher.once (c:\xampp\htdocs\myproject\node_modules\webp
ack\lib\node\NodeWatchFileSystem.js:42:26)
at EventEmitter.g (events.js:291:16)
at emitTwo (events.js:106:13)
at EventEmitter.emit (events.js:191:7)
at EventEmitter._onTimeout (c:\xampp\htdocs\myproject\node_modules\watchp
ack\lib\watchpack.js:142:7)
at ontimeout (timers.js:380:14)
at tryOnTimeout (timers.js:244:5)
at Timer.listOnTimeout (timers.js:214:5)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x8
6)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! dktrgo#1.0.0 dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dktrgo#1.0.0 dev script 'node build/dev-server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the dktrgo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs dktrgo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls dktrgo
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! c:\xampp\htdocs\myproject\npm-debug.log
Thank you
I was able to reproduce in v3.4.0, but not in v3.4.1 (which was released about 5 hours later).
To confirm you're on v3.4.0:
npm list enhanced-resolve
Please update enhanced-resolve to v3.4.1:
npm i enhanced-resolve
When I run 'npm install' in my project, I get the following failure.
I have tried manually removed the directory 'C:\Users\sacheu\AppData\Roaming\npm-cache' but I still get the following error And I am running my 'cmd' in admin mode.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x
6)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! path C:\Users\sacheu\AppData\Roaming\npm-cache\source-map\0.5.6\packag
.tgz.1001138336
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\sacheu\AppData
Roaming\npm-cache\source-map\0.5.6\package.tgz.1001138336' -> 'C:\Users\sacheu\
ppData\Roaming\npm-cache\source-map\0.5.6\package.tgz'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, rename 'C:\Users\sacheu\AppD
ta\Roaming\npm-cache\source-map\0.5.6\package.tgz.1001138336' -> 'C:\Users\sach
u\AppData\Roaming\npm-cache\source-map\0.5.6\package.tgz'
npm ERR! at Error (native)
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\sacheu\\AppData\\Roaming\\npm-cache\\source-map\\0
5.6\\package.tgz.1001138336',
npm ERR! dest: 'C:\\Users\\sacheu\\AppData\\Roaming\\npm-cache\\source-map\\0
5.6\\package.tgz' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! c:\Users\sacheu\odsp-next\npm-debug.log
I tried to install and use npm in two ways, but I get only errors.
Installing npm by normal way:
vagrant#precise64:~$ npm install
npm ERR! Couldn't read dependencies.
npm ERR! Error: ENOENT, no such file or directory '/home/vagrant/package.json'
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/vagrant/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! path /home/vagrant/package.json
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/home/vagrant/package.json'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm not ok
Trying to install latest version:
vagrant#precise64:~$ npm install -g npm#latest
npm http GET https://registry.npmjs.org/npm
npm ERR! Error: failed to fetch from registry: npm
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/vagrant/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "npm#latest"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: npm
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm not ok
What should I install before to create this package.json file ane make it work?
npm looks like it's already installed. Go to your project root and:
npm init
It'll walk you through making a package.json file, then you can
npm i whateverpackageyouwant
to your heart's content.
on my Ubuntu. I tried installing the browser plugin from chrome just as the website says to execute.
npm install dalek-browser-chrome --save-dev
problem is I get this error when running the command.
> dalek-browser-chrome#0.0.9 install /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome
> node install.js
Chromedriver installation failed Error: EACCES, permission denied '/home/monece/tmp/chromedriver'
at Object.fs.mkdirSync (fs.js:642:18)
at mkdir (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/install.js:156:8)
at Promise._successFn (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/install.js:177:7)
at Promise._withInput (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/kew/kew.js:248:25)
at Promise._chainPromise (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/kew/kew.js:290:13)
at Promise.then (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/kew/kew.js:154:13)
at /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/install.js:175:23
at /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/npmconf/npmconf.js:76:7
at Array.forEach (native)
at /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/npmconf/npmconf.js:75:13
npm ERR! dalek-browser-chrome#0.0.9 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dalek-browser-chrome#0.0.9 install script.
npm ERR! This is most likely a problem with the dalek-browser-chrome package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls dalek-browser-chrome
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-15-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "dalek-browser-chrome" "--save-dev"
npm ERR! cwd /home/monece/Desktop/dalekjs
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/monece/Desktop/dalekjs/npm-debug.log
npm ERR! not ok code 0
p.s. I also tried using sudo npm install and it still doesnt not work