简体   繁体   中英

Cannot find module 'meteor-promise'

I am using Meteor 1.4.3.2 on a windows7 dev environment. I've ran into a problem with an application after attempting to remove a failed demeteorizer attempt. After removal of demeteorizer folders/files now receiving error:

module.js:327
    throw err;
    ^
Error: Cannot find module 'meteor-promise'
    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:\Users\muser\AppData\Local\.meteor\packages\meteor-
tool\1.4.0-1\mt-os.windows.x86_32\tools\tool-env\install-promise.js:6:1)
    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 believe this meteor-promise is related to the Fibers module used in demeteorizer. Seems that files were inadvertently removed from outside of application folders due to sym-link to somewhere in \\AppData\\Local.meteor.... I think.

My other applications are still working fine, so a meteor reinstall seems unlikely to fix issue.

Adding to the excitement none of my saved versions (including fresh clones from repo) will work either. This I think adds evidence to the sym-link theory.

Any suggestions on best approach to fix the application?

Thanks very much for your time and expertise.

It sounds like quite a mess, hopefully this fixes your issue.

Delete the meteor-tool folder within the version of meteor your app is using. You mentioned you are using 1.4.3.2 so the folder to delete is probably...

C:\Users\<username>\AppData\Local\.meteor\packages\meteor-tool\1.4.3_2

You can double check by looking at the release file in your project's .meteor folder.

Once that is deleted, startup your meteor app using meteor run and it will detect that the meteor-tool version is missing and re-download it. The promise package is installed inside this folder...so re-downloading will replace it.

Thanks for your input @jordanwillis!

Absolutely a mess. Points out that while I've been happily coding along with Meteor I've neglected understanding what's under the hood. Turns out this app was using 1.4.0, not 1.4.3 as I previously stated.

Here are the actions I took which fixed my problem.

Remove folders:

C:\Users\muser\testApp\.meteor\local\dev_bundle*\*
C:\Users\muser\AppData\Local\.meteor\packages\meteor-tool\1.4.0-1\*

Ran:

C:\Users\muser\testApp> meteor run

Meteor re-installed 1.4.0-1 and did not try to recreate the dev_bundle folder which I assume was only needed for demeteorizer. The application started up and all seems good.

Thanks again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM