Can't create a new project with Foundation CSS - css

I'm just started with Foundation CSS framework. All installation was fine, but when I'm trying to create my first project, I received this error.
foundation new
/usr/local/lib/node_modules/foundation-cli/lib/commands/info.js:7
module.exports = function(args = {}) {
^
SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/foundation-cli/lib/index.js:4:9)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
Thanks all.

It looks like your nodejs is outdated. Check what version you're running. If it's older than 6, ugrade and remove the older version. It should work.

I had the same issue.
Here are the steps I took:
Clear the cache sudo npm cache clean -f
Install a helper sudo npm install -g n
Install the latest stable version of Node sudo n stable
Found this previous post

Related

meteor create throws error: module.js:549 Could not install npm dependencies for test-packages

When I tried running meteor create boilerplate the following showed up on my screen. I did some research and came up with an answer which I have posted below. It took sometime to solve so I'm sharing my solution with the hopes of helping others.
Here is is the error in its entirety.
/Users/user/.meteor/packages/meteor-tool/.1.6.1_1.o8hqcq.5zvm++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
throw error;
^
Error: Error: Could not install npm dependencies for test-packages: Command failed: /Users/user/.meteor/packages/meteor-tool/.1.6.1_1.o8hqcq.5zvm++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm install --production=false
module.js:549
throw err;
^
Error: Cannot find module '../lib/utils/unsupported.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at /Users/user/.meteor/packages/meteor-tool/.1.6.1_1.o8hqcq.5zvm++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm:19:21
at Object.<anonymous> (/Users/user/.meteor/packages/meteor-tool/.1.6.1_1.o8hqcq.5zvm++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm:92:3)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
module.js:549
throw err;
^
Error: Cannot find module '../lib/utils/unsupported.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at /Users/user/.meteor/packages/meteor-tool/.1.6.1_1.o8hqcq.5zvm++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm:19:21
at Object.<anonymous> (/Users/user/.meteor/packages/meteor-tool/.1.6.1_1.o8hqcq.5zvm++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm:92:3)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Object.error (/tools/utils/buildmessage.js:430:11)
at /tools/cli/default-npm-deps.js:36:20
at /tools/utils/buildmessage.js:334:18
at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:333:36
at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
at Object.enterJob (/tools/utils/buildmessage.js:324:26)
at Object.install (/tools/cli/default-npm-deps.js:27:27)
at Command.func (/tools/cli/commands.js:801:36)
Any help is greatly appreciated.
To solve this, I first uninstalled node using the following:
brew uninstall node;
# or `brew uninstall --force node` which removes all versions
brew prune;
rm -f /usr/local/bin/npm /usr/local/lib/dtrace/node.d;
rm -rf ~/.npm;
Then reinstalled node using the following:
brew install node;
which node # => /usr/local/bin/node
export NODE_PATH='/usr/local/lib/node_modules' # <--- add this ~/.bashrc
Then I deleted Meteor using the following:
sudo rm /usr/local/bin/meteor
rm -rf ~/.meteor
Repaired permissions:
sudo chown -R $(whoami) ~/.npm
Then reinstall Meteor:
curl https://install.meteor.com/ | sh
Now, the error is gone!
Sources:
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
How can I completely uninstall and then reinstall Meteor.js?

Gertting Error installing firebase cli in linux mint

I use crazi_boii#crazi-Boii ~ $ sudo npm install -g firebase-tools to install the cli.
and the cmd get executed perfectly.
this is the error i get after typing the command "firebase --version"
/usr/local/lib/node_modules/firebase-tools/node_modules/tar/lib/pack.js:32
const EOF = Buffer.alloc(1024)
^
TypeError: Buffer.alloc is not a function
at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/tar/lib/pack.js:32:20)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/tar/lib/create.js:6:14)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
pls help. .
Thank you
Cloud Functions for Firebase uses node 6, as stated in the documentation. You're using a much older version, so you'll need to upgrade your node installation. If you don't want to use a package manager to force an upgrade for what you have now, you can install any version of node in your home directory using Node Version Manager.

Meteor React.js Adding User Accounts Crashes Application

I'm doing the Meteor React.js tutorial part 8 here:
https://www.meteor.com/tutorials/react/adding-user-accounts
My application has been running perfectly up until this point. It crashes the moment I follow the first step in the tutorial which is to add the account packages by running the following command:
meteor add accounts-ui accounts-password
Upon doing this and attempting to run the project, the run fails and give me the following Error log:
C:\Users\Barry\AppData\Local\.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
throw(ex);
^
Error: A dynamic link library (DLL) initialization routine failed.
C:\Users\Barry\AppData\Local\.meteor\packages\npm-bcrypt\0.8.7_1\npm\node_modules\bcrypt\build\Release\bcrypt_lib.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (C:\Users\Barry\AppData\Local\.meteor\packages\npm-bcrypt\0.8.7_1\npm\node_modules\bindings\bindings.js:76:44)
at Object.<anonymous> (C:\Users\Barry\AppData\Local\.meteor\packages\npm-bcrypt\0.8.7_1\npm\node_modules\bcrypt\bcrypt.js:3:35)
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 Module.require (module.js:364:17)
at require (module.js:380:17)
Exited with code: 8
Your application is crashing. Waiting for file change.
What is causing this error to occur and how can I solve it?
There have been 9 (recommended) releases to Meteor since the version that you're using, and a lot of issues have been resolved around using bcrypt specifically. Try updating your app to the latest version of Meteor (via meteor update), remove your applications node_modules directory, and run a new meteor npm install.

Start Meteor Build

After build my Meteor APP, i would like start this with NodeJS.
I go to my /build/ folder, and run node main.js but i've this error :
Error: Cannot find module 'fibers'
Error: Cannot find module 'fibers'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\wamp\www\www.meteor.lan\build\app\bundle\programs\server\boot.js:1:75)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
I'm use Meteor 1.4 and Node 4.4.7 on Windows.
Do you have any idea how i can start my Meteor APP after build ?
Thank you :)
You'll have to install all packages, not just fibers. Inside you build directory:
cd programs\server
npm install
Try to install npm install fibers

I can't get laika to work with bdd

I'm using meteor 0.6.4.1, laika 0.2.24 and node.js 0.10.12. Tests with tdd worked fine, but I tried to use bdd with laika and it failed. I downloaded this demo project https://github.com/zvictor/laika-extended-example but also failed. I made a simple test with mocha and should (only node.js, not meteor) and worked fine. This is the error I got with the demo project:
module.js:340
throw err;
^
Error: Cannot find module 'should'
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> (/Users/camilo/Documents/Pruebas/Meteor/laika-extended-example/tests/$setup.js:1:72)
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 Module.require (module.js:364:17)
Edit
I installed should with sudo npm install -g should
Edit 2
Based on skishore comment, I used npm link should and now the problem changed. First, I got it:
injecting laika...
loading phantomjs...
loading initial app pool...
And nothing more happen so I tried with laika -D to see the logs:
[laika log] accepting the following extensions: (js)
injecting laika...
loading phantomjs...
[app touch log] [[[[[ ~/Documents/Pruebas/Meteor/laika-extended-example ]]]]]
[app touch log] => Meteor server running on: http://localhost:20472/
loading initial app pool...
[laika log] using nodejs bin(from meteor): /Users/camilo/.meteor/tools/11f45b3996/bin/node
[server log]
[server log] /Users/camilo/Documents/Pruebas/Meteor/laika-extended-example/.meteor/local/build/server/server.js:325
}).run();
^
[server log] ReferenceError: module is not defined
at app/node_modules/should/lib/eql.js:5:1
at /Users/camilo/Documents/Pruebas/Meteor/laika-extended-example/.meteor/local/build/server/server.js:286:12
at Array.forEach (native)
at Function._.each._.forEach (/Users/camilo/.meteor/tools/11f45b3996/lib/node_modules/underscore/underscore.js:79:11)
at run (/Users/camilo/Documents/Pruebas/Meteor/laika-extended-example/.meteor/local/build/server/server.js:227:7)
From the readme in the Github: you need to install should. Use npm:
sudo npm install -g should

Resources