Error: Cannot find module 'fibers'

It’s recommended to install as the user who will be using it. The installer will ask for your (sudo) password when it needs elevated permissions.

Problems are likely when you start trying to do stuff with Meteor as your normal user.

You should never use the root account for doing your day-to-day dev work!

2 Likes

Hi @atf,
Could you break down the commands that you used ? I’m still new and I don’t want to mess up the installation process by doing something wrong . :slight_smile:
Thank you for your help.

Hi @mostlyawesom,
I followed the same commands posted above by @SkyRooms.

sudo apt update

#Node.js LTS
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt install nodejs
sudo apt install nodejs-legacy
sudo apt install npm

#MongoDB
#https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

#Meteor
curl https://install.meteor.com/ | sh

sudo meteor create test
cd test
sudo meteor
# add --allow-superuser if u have an issue with METEOR_ALLOW_SUPERUSER
# meteor --allow-superuser

Ok, like many others I am facing the problem running my meteor app after the April 1803 Win 10 update. Started out with the fibers issue like everyone else. This was resolved by running the following commands in my app folder:

meteor npm uninstall fibers
meteor npm install fibers

This just led to the issue of: Error: Cannot find module 'underscore'

This is a meteor package version 1.0.10 which has not been updated in years. It points to underscore 1.4.2 and the current is 1.9.0 so it could really use some love.

Oddly, this package was not part of my build as I prefer lodash. Added this using meteor add underscore added it, but still produces the same error! Removed it again since there was no impact.

Wondering if that is causing issues. Other suggestions?

Just to follow up, wasted most of my day yesterday and now have progressed to an error AGAIN in fibers:

c:\Users\xxx\meteor\yyy\node_modules\fibers\fibers.js:89
					return fn.apply(this, arguments);
					          ^
Error: EPERM: operation not permitted, stat 'c:\Users\xxx\meteor\yyy\.meteor\local\build\programs\server\node_modules'
    at Object.realpathSync (fs.js:1678:17)...

Highly annoying, Windows Meteor seems so FRAGILE! Took the exact code over to a Linux VM and fired up immediately. So, I think it it time to migrate over once and for all. Just need to figure out best way to share files between VM and Windows machine as I want to continue working on code in the Windows environment.

hi, actually I tried. but whenever I tried to edit the files in “AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\rootfs\home” folder, it was displaying some permission error. files cannot be changed with bash running and after changes, I have to run chmod command every time I re-run the bash. so this is kind of problem on its own.

put your files on your ntfs mount ( /mnt/c/ ) , you’re not supposed to access the linux file system from windows.

I also did that. It throws an error that mongo exit with code 100.

Yes , mongodb cannot run on the mounted ntfs , the hack is to create a symlink for the .meteor/local of your project to the linux home folder like this ln -s ~/myproject/local local

  1. created a new project in /mnt/d/mtr/ank
  2. created ~/ank/local
  3. ran that command ln -s ank/.meteor/local/ /home/gysamy/ank/local

still not working. where’s the fault?

ls -la in yourapp/.meteor folder shoud show the symlink like this

EDIT : you’re reversed your symlink I think , it should be ln -s ~/ank/local/ local , not sure about this , I’m not a bash killer :smiley:


here take a look…

something weird with your last ls -la , the local should be a simple folder without a symlink , and if it’s show it red it means that is broken. remove this one , and just create a simple folder.

That’s because I specifically stated NOT to do that, EVER.

From the official issue thread: https://github.com/meteor/meteor/issues/9863

It looks like a solution is on the way:

2 Likes
PS C:\Users\[username]\fullstack> meteor create test2
C:\Users\[username]\AppData\Local\.meteor\packages\meteor-tool\1.6.1_1\mt-os.windows.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: C:\WINDOWS\system32\cmd.exe /c C:\Users\[username]\AppData\Local\.meteor\packages\meteor-tool\1.6.1_1\mt-os.windows.x86_64\dev_bundle\bin\npm.cmd install --production=false
npm ERR! Cannot read property 'match' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\[username]\AppData\Roaming\npm-cache\_logs\2018-05-16T01_31_23_763Z-debug.log
npm ERR! Cannot read property 'match' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\[username]\AppData\Roaming\npm-cache\_logs\2018-05-16T01_31_23_763Z-debug.log

    at Object.error (C:\tools\utils\buildmessage.js:430:11)
    at C:\tools\cli\default-npm-deps.js:36:20
    at C:\tools\utils\buildmessage.js:334:18
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:333:36
    at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
    at Object.install (C:\tools\cli\default-npm-deps.js:27:27)
    at Command.func (C:\tools\cli\commands.js:801:36)
    at C:\tools\cli\main.js:1523:15
PS C:\Users\[username]\fullstack>

What’s happening here? did a reinstall and still see the error

This fix has been merged into the 1.7 branch, but is not in the latest release build (rc.11). Any idea when we will see either a new RC or a final release of 1.7? I’m unable to run on Windows any longer after the April update of Windows 10. For political reasons I’m unable to install WSL as a work-around.

1 Like

No idea sorry.

On the 1.7 pull request it looks like it was added 4 days ago so I’m surprised it’s not in the latest release candidate

Maybe ask the devs on that thread? https://github.com/meteor/meteor/pull/9826

1 Like

you are spot on, this fixes it, which is great. BUT its not exactly a good build process - its like a fix to a (broken) build process that shouldn’t really exist - though I note meteor’s own build notes include the same necessary step. Any ideas how can this ‘fix’ step be avoided for a build pipeline ?