I successfully migrated our codebase from Meteor 2.1 to 2.5 and it works perfectly locally, however when I deploy to one of our test environments I seem to have run into an issue with building it. At that point stupidly decided to go down the path of trying different solutions that I found online and have probably made the task even difficult - the fallback is I redeploy the test VM from a snapshot if I can’t fix it. Regardless, I’ll need to work out the solution once it goes into production. We were using fourseven:scss 4.12.0 (I think) however this is no longer available so I upgraded it to 4.15.0.
Meteor version: 2.5
node version: v16.13.0
npm version: 8.1.2
node-gyp version: 8.3.0
fourseven:scss version: 4.15.0
- I’ve played around with resintalling Node.JS
- Installing Python
- Installing the Windows dev tools
- installing the latest version of node-gyp
I know this issue can often to be related to Python or the dev tools but not had much luck with updating those.
I think it could be related to this:
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Here’s the full error log:
λ meteor build --directory C:\ausbundle\
=> Errors while initializing project:
While loading package fourseven:scss@4.15.0:
error: Command failed: C:\windows\system32\cmd.exe /c C:\Users\mdcareadmin\AppData\Local\.meteor\packages\meteor-tool\2.5.0\mt-os.windows.x86_64\dev_bundle\bin\npm.cmd rebuild --update-binary
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'C:\\Users\\mdcareadmin\\AppData\\Local\\.meteor\\packages\\meteor-tool\\2.5.0\\mt-os.windows.x86_64\\dev_bundle\\bin\\node.exe',
gyp verb cli 'C:\\Users\\mdcareadmin\\AppData\\Local\\.meteor\\packages\\fourseven_scss\\4.15.0\\plugin.compileScssBatch.os\\npm\\node_modules\\meteor\\compileScssBatch\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@14.18.1 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "C:\Users\mdcareadmin\AppData\Local\.meteor\packages\meteor-tool\2.5.0\mt-os.windows.x86_64\dev_bundle\python\python.exe" in the PATH
gyp verb `which` succeeded C:\Users\mdcareadmin\AppData\Local\.meteor\packages\meteor-tool\2.5.0\mt-os.windows.x86_64\dev_bundle\python\python.exe C:\Users\mdcareadmin\AppData\Local\.meteor\packages\meteor-tool\2.5.0\mt-os.windows.x86_64\dev_bundle\python\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\mdcareadmin\AppData\Local\.meteor\packages\meteor-tool\2.5.0\mt-os.windows.x86_64\dev_bundle\python\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:383:12)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at maybeClose (internal/child_process.js:1058:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Users\\mdcareadmin\\AppData\\Local\\.meteor\\packages\\meteor-tool\\2.5.0\\mt-os.windows.x86_64\\dev_bundle\\bin\\node.exe"
"C:\\Users\\mdcareadmin\\AppData\\Local\\.meteor\\packages\\fourseven_scss\\4.15.0\\plugin.compileScssBatch.os\\npm\\node_modules\\meteor\\compileScssBatch\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\mdcareadmin\AppData\Local\.meteor\packages\fourseven_scss\4.15.0\plugin.compileScssBatch.os\npm\node_modules\meteor\compileScssBatch\node_modules\.temp-w676e2.pj58c\node_modules\node-sass
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.14.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mdcareadmin\AppData\Roaming\npm-cache\_logs\2021-11-02T04_29_10_523Z-debug.log
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'C:\\Users\\mdcareadmin\\AppData\\Local\\.meteor\\packages\\meteor-tool\\2.5.0\\mt-os.windows.x86_64\\dev_bundle\\bin\\node.exe',
gyp verb cli 'C:\\Users\\mdcareadmin\\AppData\\Local\\.meteor\\packages\\fourseven_scss\\4.15.0\\plugin.compileScssBatch.os\\npm\\node_modules\\meteor\\compileScssBatch\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@14.18.1 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "C:\Users\mdcareadmin\AppData\Local\.meteor\packages\meteor-tool\2.5.0\mt-os.windows.x86_64\dev_bundle\python\python.exe" in the PATH
gyp verb `which` succeeded C:\Users\mdcareadmin\AppData\Local\.meteor\packages\meteor-tool\2.5.0\mt-os.windows.x86_64\dev_bundle\python\python.exe C:\Users\mdcareadmin\AppData\Local\.meteor\packages\meteor-tool\2.5.0\mt-os.windows.x86_64\dev_bundle\python\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\mdcareadmin\AppData\Local\.meteor\packages\meteor-tool\2.5.0\mt-os.windows.x86_64\dev_bundle\python\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:383:12)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at maybeClose (internal/child_process.js:1058:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Users\\mdcareadmin\\AppData\\Local\\.meteor\\packages\\meteor-tool\\2.5.0\\mt-os.windows.x86_64\\dev_bundle\\bin\\node.exe"
"C:\\Users\\mdcareadmin\\AppData\\Local\\.meteor\\packages\\fourseven_scss\\4.15.0\\plugin.compileScssBatch.os\\npm\\node_modules\\meteor\\compileScssBatch\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\mdcareadmin\AppData\Local\.meteor\packages\fourseven_scss\4.15.0\plugin.compileScssBatch.os\npm\node_modules\meteor\compileScssBatch\node_modules\.temp-w676e2.pj58c\node_modules\node-sass
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.14.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mdcareadmin\AppData\Roaming\npm-cache\_logs\2021-11-02T04_29_10_523Z-debug.log
What are the correct minimum versions for these packages? And am I right in saying that we now need to use Python 3+ or is it still 2.7?